December 6th, 2007 by Andrew
I use my PowerMac G5 at work to develop and design sites locally. Apache in Mac OS X seems to come with MultiViews enabled by default. Multiviews is part of mod_negotiation. I know mod_negotiation as it is very helpful with setting mime types using code like:
AddType image/gif .gif
MultiViews I was unfamiliar with. What it does is take a url like:
and it does a search in the root directory for a file or directory which could match llama.*, such as llama.jpg, then delivers that content to the user.
This seems like it would be very helpful in certain situations, but I wasn’t liking this feature, since it was interfering with my .htaccess rewrites. It took me awhile to figure it out, but by turning this off, I was able to gain control of rewrites again.
Here’s how I did it. I opened the httpd.conf file:
sudo pico /private/etc/httpd/httpd.conf
And switched the line that said:
Options Indexes FollowSymLinks MultiViews
Options Indexes FollowSymLinks
It was that simple. After that, I could rewrite everything I wanted.