Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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;
share|improve this question
up vote 2 down vote accepted

I retreated to using mod_rewrite. The following rule rewrites URLs without a dot (".") only, so /images/image.jpeg is left alone:

RewriteRule ^/([^\.]+)$ /$1.html [L]
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.