I am having a trouble with two different apache servers. They are 2.2.x, so minor version is different.

At both of them i have the same php application with this .htaccess:

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule ^.*$ index.php [NC,L]

My issue is that in server A, when i access products/ it redirects me to products.php.

While in server B, when i access products/ it redirects me to index.php. This is the correct and wanted behavior.

As the modrewrite rules are equal in both servers, any ideas of other directives that could be causing this problem?


  • There is nothing in the rewrite rules you given that would change products/ into products.php. There is something else on server A that you've missed, possibly in a .htaccess file. Turn up the RewriteLogLevel to see. Nov 15, 2010 at 17:24

1 Answer 1


While the trailing slash doesn't make sense, mod_negotiation / Options Multiviews would gladly map products to products.php completely orthogonal to mod_rewrite.

edit: duh, AcceptPathInfo on + Options +Multiviews would give you products/ -> products.php with PATH_INFO of "/".

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .