Main Content

Alternative URLs using % symbol encoding

Archive - Originally posted on "The Horse's Mouth" - 2008-09-27 11:16:19 - Graham Ellis

Did you know that you can replace a character in a URL with the equivalent hex code - i.e. you can URL encode it? For example:
http://www.geocities.com/pem20165/wodph158%41shburnStation.html
and
http://www.geocities.com/pem20165/wodph158AshburnStation.html

both point to the SAME page, as %41 is the URL encoding for capital A!

You may wonder why on earth you might use a facility such as this!. Firstly, and regrettably, it's often used with bad intent to obfuscate URLs - remove key words that would be spam trapped. But my requirement was slightly different - our Wiki (which you can see through our share pages - for example this page I put up this morning) identifies a sequence of Capital-lower case - capital as being a link. Which I did not want to appear within the links quoted above, so I simply rewrote them using the alternative encoded notation.