Encode the url properly