1.

Solve : index.htm and index.html both on root directory of a website?

Answer»

I am using Windows 7 and Dreamweaver CS5 to manage a WEBSITE.  Somehow, I've GOTTEN an "index.htm" and "index.html" on the root directory of the site (it was my own fault!).  I think that there are people with my site in their Favorites list with the ".htm" and some with the ".html" file being called. 

My question: is there any way that I can have one of these (say ".html") immediately and transparently directing the user to the other file (say, to the ".htm")?  I don't want these two index files with these different extensions on my root folder so I would have to update them identically whenever there is a change.  Any suggestions would be gratefully accepted.

Thanks very much!Download the .HTM file.
Then remove it from the site.
The bookmarks are to the root, not the file.
On most sires the root is public_html and the browser will GET one of
index.htm
index.html
index.php
Your site company can show you  a tutorial.
Or this might help you:
http://webdesign.about.com/od/beginningtutorials/f/index_html.htm
You might want to use the .HTM file as a the "Under Maintenance" message file. Upload it when you have to do work on the site and remove it when done.  Thank you, Geek-9pm!  That answer (and the link you suggested) look very helpful.  I'll do what you suggest.If the pages are identical you'll want to resolve to one version of the page. Google can penalize you for duplicate content. Provided you're on an apache server you can do a 301 redirect in the .htaccess file. This would resolve all .htm pages to .html or vice versa depending on your needs.

RewriteEngine on
RewriteBase /
RewriteRule ^(.*)\.htm$ $1.html [R=301]On Godaddy I have used URL Forwarding as WELL which allows 2 paths to resolve to a single path, so you can have it redirect the url path ending in htm to html and no matter which of the 2 paths are used they both point to the single html page or htm page that you decide to keep as the single page to keep, removing the other.

Who is your web HOST and  domain that you registered with?

I have heard that some internet security software flags redirection though in which a user has to agree that they want to be redirected though or it blocks the users from getting there.

My suggestion would be to keep both htm and html and state that the one is the old site and have a link for them to click to get to the new site. I'd also specify that they should update their shortcut or bookmark to the new site page.



Discussion

No Comment Found