0

I am looking to prevent URLs for directories that don't exist from loading files with the same basename. For example http://domain.com/test/ is loading test.php. The test directory does not exist, but the file test.php does. I can see how this would be useful in most cases, but I am looking to disable it for my project.

I am on an Apache server. Is there a way to disable this option through an .htaccess file?

If there is an actual name for this type of feature, maybe "wildcard filename helper" or something like that, I'd like to know the official term too. Thanks!

4

1 回答 1

1

This happens because MultiViews is enabled on the server.

If the apache configuration allows you to do so, you should be able to disable it by putting the following in .htaccess:

Options -MultiViews
于 2013-03-29T23:52:26.453 回答