Correctly parse the URL string.