Forum Moderators: open
I'm just learning about using hex encoding to escape certain special characters in a URL, ie '&' or '?'
So shouldn't this example URL:
http://www.example.com/subpage.asp%3FsectionID%3D752
be interpreted by my browser as:
http://www.example.com/subpage.asp?sectionID=752
and therefore take me to http://www.example.com/subpage.asp?sectionID=752
Thanks for any help!
[edited by: encyclo at 7:12 pm (utc) on Feb. 26, 2007]
[edit reason] switched to example.com [/edit]
If you encode the URL as you have done, then I think it's going to try and find a file called: "subpage.asp%3FsectionID%3D752" - which I suspect doesn't exist?!
I recon you only need to encode/escape the actual 'values' that are being past in the URL. ie. 752 in your case (which doesn't actually need encoding). However, if you wanted to pass:
http://www.example.com/subpage.asp?sectionID=some text
Then the 'space' would need to be encoded:
http://www.example.com/subpage.asp?sectionID=some%20text
ie http://www.example.com/subpage.asp?sectionID=752
becomes just http://www.example.com/subpage.asp
[edited by: encyclo at 6:56 pm (utc) on Feb. 28, 2007]
[edit reason] switched to example.com [/edit]