title: How to prevent Apache / mod_rewrite from treating path as file with same name
body: <p>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).</p>
  
  <p>I have a PHP file located at:
  <code>/ajax/graphs/get-graph.php</code></p>
  
  <p>The way this file is normally invoked is via a bootstrap file loaded by
  <code>/index.php</code></p>
  
  <p>I have a .htaccess file at the root with the following rules:</p>
  
  <pre><code>RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule ^(.*)$ /index.php [L]
  </code></pre>
  
  <p>So, basically, when my app requests via AJAX a call to <code>/ajax/graphs/get-graph/</code>it should be directed to <code>/index.php</code>.</p>
  
  <p>The problem is, Apache/mod_rewrite sees the request path and loads <code>/ajax/graphs/get-graph.php</code> directly.  </p>
  
  <p>How do I prevent Apache from assuming that <code>/ajax/graphs/get-graph/</code> is a valid file because a php file of the same name exists at that location?</p>