In Reply To:
I haven't tested it, but I thought $PHP_SELF would be undefined with register_globals turned off?
? $php_self != $PHP_SELF. $HTTP_SERVER_VARS['PHP_SELF'] isn't just 'page.php', it's the path to page.php as well as any paths after it. For example, if page.php is in /stuff/, and someone accessed it through:
/stuff/page.php/Some_Category/Some_Link
then ALL of that will be in $HTTP_SERVER_VARS['PHP_SELF'], not just page.php. There's no reliable way to parse that out because you someone could also do:
/my.php/page.php/evil.php
assuming they installed it into my.php directory...
Adrian