homepage Welcome to WebmasterWorld Guest from 54.237.78.165
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / WebmasterWorld / New To Web Development
Forum Library, Charter, Moderators: brotherhood of lan & mack

New To Web Development Forum

    
Remove .html extension on all pages of my site[Help for Noob] D:
remove html extension
halcyonlost

5+ Year Member



 
Msg#: 4058112 posted 4:48 am on Jan 11, 2010 (gmt 0)

Hi Guys,

Ok, I'm completely new to this and would really appreciate some help. I'm trying to remove the .html extension at the end of my site pages.

Example:

My pages currently looks like this:

www.example.com/about-us.html

and I want them to look like:

www.example.com/about-us

My hosting is on godaddy shared windows. Whenever I try to manually change it to "http://www.example.com/about-us", I get a 404 error. I have tried to use .htaccess with no success, can it be used on a windows based server? D:

Please let me know how to fix this problem and thanks in advance.

 

piatkow

WebmasterWorld Senior Member piatkow us a WebmasterWorld Top Contributor of All Time 5+ Year Member



 
Msg#: 4058112 posted 10:50 am on Jan 11, 2010 (gmt 0)

I have never looked into the possibility of extensionless file names but I guess that what GoDaddy is trying to serve is www.example.com/about-us/index.html

I used an extensionless structure on a former site but did it at a folder level instead.

halcyonlost

5+ Year Member



 
Msg#: 4058112 posted 8:31 pm on Jan 11, 2010 (gmt 0)

Hi Piatkow,

Thanks for the quick response. By doing it at folder level does that mean creating a folder(as in "about-us") and dropping the about-us.html page into it? Is this good for SEO?

Thanks in advance!

phranque

WebmasterWorld Administrator phranque us a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month



 
Msg#: 4058112 posted 11:16 am on Jan 12, 2010 (gmt 0)

you can do extensionless on a windows server if you have isapi_rewrite installed.

another way to do this (probably what piatkow is referring to) is if you can specify the default directory index document such as index.html and create a directory structure with names similar to your original documents.
then refer the the "extensionless" document with a trailing slash, which makes it a directory url.
that way a request for /about-us/ is actually served the file located at /about-us/index.html
it's not an ideal solution, but it may be your only option if you have limited control.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / WebmasterWorld / New To Web Development
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved