Jump to content

URL encoding help


kevisazombie

Recommended Posts

Hi all,

 

I have some dynamic rewritten URLs through out the site I am working on. I am running into an issue on hyperlinks with relative hrefs. If the URL on the href contains a .com, .net, .org etc I am getting a 404 when going to the URL. here is an example

 

http://www.mysite.com/admin/users/search/email/gmail.com/2

 

The link would direct you too the admin area of the site, in the users section, showing search results, by email, for emails like Gmail.com, on page 2 of the results.

 

This URL will produce a 404  If I manually remove the period in gmail.com the page will render correctly but the search becomes useless as it is now searching for gmailcom.

 

I also run into this on URLs like:

http://www.mysite.com/product/449/ozmatix.com-sweets

 

where its looking for a product product / product number / product title

 

 

I have tried urlencoding and rawurlencoding but apparently they do no touch periods.

 

 

Anyone have any ideas how to deal with this?

Link to comment
https://forums.phpfreaks.com/topic/150786-url-encoding-help/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.