Rahul Sekhar
Rahul Sekhar

Reputation: 2841

Apache - disabling automatic rewrite

I'm just beginning to test my usage of mod_rewrite on a local apache setup.

While rewrite rules are working fine, my problem is that a page like "localhost/foo/" is automatically redirected to "localhost/foo.php". This happens even with no rewrite rules. Is this normal? I assume not, since this does not happen on my hosted domain. How can I disable this?

Upvotes: 1

Views: 979

Answers (2)

Rahul Sekhar
Rahul Sekhar

Reputation: 2841

Figured out what the problem was - documenting it as an answer for future searchers [is this the correct procedure?]

I had to disable MultiViews - it was redirecting localhost/foo to localhost/foo.php if it could find that file. Everything worked just fine once that was done.

Upvotes: 5

mike jones
mike jones

Reputation: 659

Some sort of rewrite is going on. You could rename the actual module on disk to make sure its not used. In Linux it is /usr/lib/httpd/modules/mod_rewrite.so

Upvotes: 0

Related Questions