When Apache invents filename extensions and index = index.php

I have now had this problem about every year for the last three or four years, and every time have completely forgotten how I resolved it the previous time. It’s especially annoying, because usually involves searching for such common terms as index.php, apache, directory, etc. which result in almost entirely useless information.

So, here, for my own future reference, is how to stop a stupid Apache from serving /index as /index.php (at, of course, any depth of the path):

Options -MultiViews

So easy. The documentation explains it all.

I’ve just added it to the WebDB .htaccess.

(I have since discovered that this is, of course, already covered on StackOverflow.)

Retrieved from ‘https://wiki.samwilson.id.au/index.php?title=When_Apache_invents_filename_extensions_and_index_%3D_index.php&oldid=464