Forum Moderators: phranque

Message Too Old, No Replies

automatically adding ".html" to a request

don't know what directive does this

         

crevier

7:11 pm on Jan 2, 2006 (gmt 0)

10+ Year Member



I have a site with a directory at the root level named "art". In there I have a file named "careers.html". The following URL works fine:

[mysite...]

However, the following URL also serves up the same page:

[mysite...]

What Apache directive causes this to happen? I've been searching the Apache site and just can't find it. I want to turn it off.

The URL is not being rewritten. It remains as above in the browser, and my access_log shows simply that "/art/careers" was served with a 200 code.

The following gives a 404 error because there is no folder named "careers" (which is what I'd expect):

[mysite...]

So, I'm just looking for the directive that causes Apache to append a ".html" to the request when looking for the file.

jdMorgan

8:17 pm on Jan 2, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You likely have content negotiation enabled.

Add the following directive to your top-level .htaccess, or modify httpd.conf:


Options -MultiViews

Jim

crevier

9:54 pm on Jan 2, 2006 (gmt 0)

10+ Year Member



Thanks Jim. That's exactly what it is. I've been using Apache for 10 years, and just never had a need for MultiViews. Looks pretty slick.