Apache2.2 FallbackResource not working?

So, I have a fallbackresource configured in Apache to send index.php requests to webroot and it seems to work, unless I call a nonexistent php file in the webroot directory. For example, if I try to get "/a.php" that does not exist, I get 404 error. But if I call "/nodir/a.php", it will send it to index.php as expected.

I searched google and read the Apache documentation for this function, but didn't find out why this is happening.

My setup Server version: Apache / 2.2.20 (Ubuntu) Using the default site with the default configuration with "FallbackResource / index.php" in the directory section

Any ideas?

I can get this working correctly using mod_rewrite with the following main lines in .htaccess, but obviously will prefer FallbackResource:

(.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. 
+8
apache2
source share

No one has answered this question yet.

See related questions:

84
Apache will not follow symbolic links (403 Forbidden)
7
FallbackResource on Apache2 (2.2.22 (Ubuntu))
2
Overwrite rule to hide folder does not work correctly if there is no slash
0
mime.type for non-web directory
0
Redirecting the pattern of old URLs in Apache2 and Drupal
0
Apache redirects to index.php incorrectly
0
php symfony and apache2 - .phtml not working
0
Why does my directory in public_html disappear if I use the "RewriteEngine on" directive in the .htaccess file?
0
mod_rewrite to a directory to another host
0
php slim duplicate response body data

All Articles