I get exactly the same trouble for a while. There is a recipe in the cookbook, but this only cover cgi. -> http://quixote.ca/qx/TailEater (so not the best sollution right now) Perhaps, it's time to introduce something like a URLParser ? I used this for webware (http://www.larsen-b.com/Article/91.html) and this is really easy to use. Bye Bye..