URLs WITHOUT .html Extensions Are Not Working

I was testing my website and I just realized that this url doesn’t load in the browser [I]without[/I] the .html extension typed into the address bar. So, in short, [URL=“http://www.creativemilldesigns.com/help.html”]this URL works but [URL=“http://www.creativemilldesigns.com/help”]this URL does not. This site is hosted by GoDaddy.com (I hope that’s not the problem). I registered the website yesterday.

I have another website that is hosted by Yahoo and all of the page URLs work whether or not the “.html” extension is typed into the address bar. I hope it’s not the hosting service that’s making a difference. Anyone know what’s wrong and why?

You can set that up using the .htaccess file in Apache. This will work for HTML and PHP files:

RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}\\.html -f
RewriteRule ^(.*)$ $1.html

RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}\\.php -f
RewriteRule ^(.*)$ $1.php

Nice one C.

To access a url without a .html extensions (and without .htaccess revision), you need to create a folder called “help” and place an index.html file in that folder. Then this link will work. Right now, the file is located in your html root directory, which is why [URL=“http://www.creativemilldesigns.com/help.html”]this link works.

Your file path right now is:

You want it to be:

Does this explanation make sense?

Ehm - why go to the trouble of setting up lots of directories with only one file, when you can just use the code I provided?

He/she posted “Anyone know what’s wrong and why?”. I was merely trying to explain the problem, and in no way insinuated your method was better or worse.

Fair enough - but Yahoo! does use .htaccess to make the requested functionality (though it’s not directly visible, since Yahoo! does not allow their users to change the .htaccess file).

Not all web serves give you the level of control you need. I’m suffering at the moment with a website that I have taken on (not commercially), where the hosting arrangements are such that any redirects in the .htaccess file are ignored completely. :mad:

@ Stevie D see if this method works for you

<FilesMatch .*>
   Options +MultiViews

I know how to do it, and I’ve done it on other sites, just this one that I’ve picked up recently on Fasthosts, where a lot of the configuration can only be done through their point-and-dribble interface and not directly in the .htaccess file, and a lot of the configuration can’t be done at all.