I have been using Url re-writing on my new website www.trainingcoursebooker.com to try and make friendly, human readable urls which are good for both people and search engines. There is a very subtle problem which I finally found and more importantly found a solution to.
Everything works great in testing and in live. However my email inbox was suddenly filled with notifications of errors on the site (I’ve written code that notifies me of all errors via email so I don’t have to check event logs). The important part of the exception message is:
Message: Cannot use a leading .. to exit above the top directory.
After a google around most of the answers seemed to be in the fact I would be using some kind of ../../../ notation to reference a stylesheet or something. After going through all my code multiple times I was sure it wasn’t that. I could not reproduce the errors and was very puzzled.More...