Hello, I have a site that links directly to it's own pages (all in 1 directory) via the page name suffixed by .htm or .html I want to change the site design to match my other site, so each page has a directory, and within that an index.php file. Is there a way to do this via .htaccess or redirects so i dont loose my page ranks, or my placement on the search engines? Thanks Late
You can use mod_rewrite to do a 301 redirect. If you place the following in a domain.com/.htaccess file, it should redirect all pages of the format http://domain.com/*.html to http://domain.com/*/ Options +Indexes Options +FollowSymlinks RewriteEngine on RewriteRule (.*)\.htm(l?) http://www.domain.com/$1/ [R=301,L] Code (markup):
The problem is i have html and htm files. Also i want to do this: www.***.com/links.htm = www.***.com/links/ (file will also be a .php file) www.***.com/history.htm = www.***.com/history/ (file will also be a .php file) I wish i had thought about this before i did the site. If i do use redirects, will google eventually change its reference from www.***.com/links.htm to the new one? Thanks