note 94225 deleted from reserved.variables.server by danbrown
| From: | danbrown@php.net | Date: | Fri, 23 Oct 2009 16:00:20 +0000 |
| Subject: | note 94225 deleted from reserved.variables.server by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-162023@lists.php.net to get a copy of this message | ||
Note Submitter: pgl at yoyo dot org
----
A note about $PHP_SELF with Apache RewriteRules: if the RewriteRule is added at the server config
level (ie, in httpd.conf), then $PHP_SELF will be similar to the REQUEST_URI. However, if the
RewriteRule is set on a per-directory basis (ie, in a .htaccess file), then it will be the name of
the file itself.
eg, with a rule like this:
RewriteRule /arse/test /var/www/arse.php?var=test
- in .htaccess, $PHP_SELF will be arse.php
- in httpd.conf, $PHP_SELF will be /arse/test