If you must store your session in the URL do it as $QUERY_PATH, that means use a .pl directory. If you are on a .html file, configure your server to ignore this part of the URL and use relative links. Example: http://server/s4563453/index.html should serve /index.html , from there <a href=new.pl > would try to get
http://server/s4563453/new.pl which should redirect to http://server/new.pl/s4563453 (in apache there is mod_rewrite for this, don't know about IIS).