PDA

View Full Version : URLs WITHOUT .html Extensions Are Not Working...



jihanemo
Apr 17th, 2010, 11:21 PM
I was testing my website and I just realized that this url (http://www.creativemilldesigns.com/help) doesn't load in the browser without the .html extension typed into the address bar. So, in short, this URL (http://www.creativemilldesigns.com/help.html) works but this URL (http://www.creativemilldesigns.com/help) 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 (http://www.americanchic.net/help) 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?

effpeetee
Apr 18th, 2010, 02:47 PM
It is the same with my site. html is necessary too.
It is probably the ISP, but it may be possible to get the ISP to allow configutation to alter this.

EDIT: I agree with Donkey. The only exception is the initial call which does not require a filename at all.

eg: www.exitfegs.co.uk

will automatically find the initial page.

Frank

Donkey
Apr 18th, 2010, 03:15 PM
I didn't know that it was possible to drop the .html extension. It seems a bad idea to me what happens if you have similarly named pages (for instance when you are testing) e.g. widgets.html, widgets.php, and widgets.shtml which one gets opened?

Excavator
Apr 18th, 2010, 06:03 PM
Hello jihanemo,
It's done server side. I can't imagine this intentionally being done by your ISP though. You must have done it yourself somehow, copy/pasted a new .htaccess file?
I think this is used mostly as a way to clean up long urls.

Your godaddy site works normal.
http://www.creativemilldesigns.com/help.html opens the file named help.html

http://www.creativemilldesigns.com/help looks in a directory called help for a default file, like index.html.


Can you quote the two different .htaccess files here?


/edit - I found this - http://www.codingforums.com/showthread.php?t=193333 - I'll bet you can search codingforums.com and find more.

drhowarddrfine
Apr 18th, 2010, 09:24 PM
if you have similarly named pages (for instance when you are testing) e.g. widgets.html, widgets.php, and widgets.shtml which one gets opened?

The server will look for .html first, then .shtml followed by .php. The first and second are automatic in Apache and most servers, I believe. The third might be but don't recall. In any case, these are set up in the .htaccess or other server config files.