I have a page that is called with a url like
http://testserver/path/to/foo/bar/
but apache is serving the wrong file altogether.
/path/to/
is a real directory where all the code and .htaccess
file is. foo/bar/
is supposed to redirect to foo_bar.php
with a RewriteRule
, but it never gets there. It's not a mod_rewrite
issue as I have commented out all the rules that could be interfering, which should give me 404s for that request, but the same problem occurs:
the file that is served is /path/to/foo.php
, so in it I var_dump
$_SERVER
and get:
REQUEST_URI = /path/to/foo/bar/
SCRIPT_NAME = /path/to/foo.php
SCRIPT_FILENAME = /real/path/to/foo.php
PATH_INFO = /bar/
PATH_TRANSLATED = /real/bar/
PHP_SELF = /path/to/foo.php/bar/
Why is this request being routed to this file at all?