Question : How to redirect an HTML file

I updated a number of files on a website from FILENAME.htm to FILENAME.html
How can I redirect visitors who looking for the original file name so I can redirect them to the new filename? So, they may have THISPAGE.htm bookmarked, but I want to redirect them to the new page which is THISPAGE.HTML. This is a hosting account on a Linux server.
Thanks.

Answer : How to redirect an HTML file


If you want to maintain your SEO and search engine stats for the pages you moved, I wouldn't do a META redirect. Instead, you should do a 301 redirect, which is usually the correct way to say to a Search Engine the page has moved.

If the site is hosted on Apache, you can do this in your .htaccess file. The command would be something like:
redirect 301 /page.htm http://www.domain.com/page.html. More on that at http://www.isitebuild.com/301-redirect.htm.

Alternatively, if you've moved a number of files or there is some pattern to the files which have been renamed, this could be achieved through a mod_rewrite rule.

-Matt
Random Solutions  
 
programming4us programming4us