Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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?

Thanks!

share|improve this question
    
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. –  Mark Wagner Nov 15 '10 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 "/".

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.