On Tuesday, 18 March 2008 12:02:14 Richard Heyes wrote: > You can use $_SERVER['PHP_SELF'] which will give you the path to the > script or $_SERVER['REQUEST_URI'] (you will probably have to remove the > query string with this), along with either dirname(). The problem is that the URL does not stay constant, it keeps growing. For example after clicking between home and use1 a few times I see these values, note how index.php repeats: 'REQUEST_URI':/~donn/template-dev/routertest/index.php/index.php/home dirname('REQUEST_URI'):/~donn/template-dev/routertest/index.php/index.php I suppose some kind of htaccess voodoo could help here, but I am in no shape to grok those murky waters. A link <a href="index.php/use1"> causes 'index.php/use1' to be appended to the full url [http://localhost/~donn/template-dev/routertest/] and at first, it's fine but after a few clicks, it keeps appending. Amazingly things still work, but the URL is out of control! All I can think to use to enforce correct link behaviour is to employ absolute urls. Thanks for the feedback. \d -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php