title: Apache2.2 FallbackResource Not Working?
body: <p>So I have the fallbackresource configured in Apache to send requests to an index.php in the webroot and it seems to work except when I call a non-existent php file in the webroot directory. For example, if I try to get "/a.php", which doesn't exist, I get a 404 error. But if I call "/nodir/a.php", it sends this to the index.php file as expected.</p>
  
  <p>I have searched google and read the Apache documentation for this feature but haven't found out why this is happening.</p>
  
  <p>My Setup
  Server version: Apache/2.2.20 (Ubuntu)
  Using default website with default config with "FallbackResource /index.php" under the directory section</p>
  
  <p>Any ideas?</p>
  
  <p>I am able to get this working correctly using mod_rewrite with the following basic lines in .htaccess but would obviously prefer the FallbackResource instead:</p>
  
  <pre><code>(.htaccess in webroot)
  RewriteEngine On
  RewriteCond /var/www/%{REQUEST_FILENAME} !-f
  RewriteCond /var/www/%{REQUEST_FILENAME} !-d
  RewriteRule (.*) index.php
  
  Trying 127.0.0.1...
  Connected to localhost.
  Escape character is '^]'.
  GET /a.php HTTP/1.1
  HOST: localhost
  Connection: close
  
  HTTP/1.1 200 OK
  Date: Sat, 31 Dec 2011 02:37:48 GMT
  Server: Apache/2.2.20 (Ubuntu)
  X-Powered-By: PHP/5.3.6-13ubuntu3.3
  Vary: Accept-Encoding
  Content-Length: 43
  Connection: close
  Content-Type: text/html
  
  /a.php
  localhost
  
  Connection closed by foreign host.
  </code></pre>