I'm using WAMP Server, mostly configured as-is out of the box. I'm having trouble getting mod_rewrite to behave as expected locally (everything works fine on a production server).
I have a PHP file located at:
/ajax/graphs/get-graph.php
The way this file is normally invoked is via a bootstrap file loaded by
/index.php
I have a .htaccess file at the root with the following rules:
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php [L]
So, basically, when my app requests via AJAX a call to /ajax/graphs/get-graph/
it should be directed to /index.php
.
The problem is, Apache/mod_rewrite sees the request path and loads /ajax/graphs/get-graph.php
directly.
How do I prevent Apache from assuming that /ajax/graphs/get-graph/
is a valid file because a php file of the same name exists at that location?