Welcome to WebmasterWorld Guest from 54.157.239.93

Forum Moderators: Ocean10000 & incrediBILL & phranque

Message Too Old, No Replies

automatically adding ".html" to a request

don't know what directive does this

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

Junior Member

10+ Year Member

joined:Sept 19, 2005
posts:44
votes: 0


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.

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

Senior Member

WebmasterWorld Senior Member jdmorgan is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Mar 31, 2002
posts:25430
votes: 0


You likely have content negotiation enabled.

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


Options -MultiViews

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

Junior Member

10+ Year Member

joined:Sept 19, 2005
posts:44
votes: 0


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.
 

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members