Click to See Complete Forum and Search --> : Remove .html extension on all site pages[Help for Noob] D:
sweetfranky
01-11-2010, 02:47 PM
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 or if you need any more info and thanks in advance.
tracknut
01-11-2010, 04:05 PM
.htaccess is an Apache thing, available if you host with GoDaddy's Unix servers. Depending on whether you use any Windows-specific server code on your site, it could be anywhere from simple to complex to switch to Unix.
Dave
sweetfranky
01-11-2010, 04:30 PM
.htaccess is an Apache thing, available if you host with GoDaddy's Unix servers. Depending on whether you use any Windows-specific server code on your site, it could be anywhere from simple to complex to switch to Unix.
Dave
Thanks Dave for the quick response. Is there any other way around this beside switching servers?
tracknut
01-11-2010, 04:44 PM
It might depend on exactly what you expect to happen, but for example if you made a directory called "about-us", and then copied your about-us.html file into that directory and named it index.html (i.e. it is now at www.example.com/about-us/index.html), then if a user types in his browser www.example.com/about-us he will end up at that page. But his browser may re-display the URL he typed with the entire string on it, which may blow your cover, if you're trying to hide something.
Other than that, I'm not aware of an .htaccess-like gizmo for IIS servers, but then I'm not aware of much at all for IIS, I just don't use it.
Dave
sweetfranky
01-11-2010, 04:48 PM
Thanks again Tracknut. I've submitted a ticket to godaddy so hopefully they will have a windows solution. :D Otherwise, I'm going to have to switch... D:
kiwibrit
01-11-2010, 06:56 PM
If you have an 'about-us' folder, and have an index file (index.html) in that, then calling up www.example.com/about-us will call up the page - and probably display in your browser as www.example.com/about-us/
rnd me
01-14-2010, 07:13 PM
you can also create a URL-rewrite entry in your web.config file.
you would then re-map all the requested "folders" to whatever .html you want to show up at that location.