How to ensure precedence of files over directories with Apache?
- by janeden
My httpd.conf uses the MultiViews option to serve HTML files for URLs like http://server/blog. This works fine, unless there are directories with the same name – Apache will then try to serve the directory.
Is there any way to ensure precedence of blog.html over blog/, or rather: can I make Apache process content negotiation according to MultiView although a matching entity (the directory) is present?
In nginx, I can do this explicitly:
try_files $uri $uri.html $uri/ =404;