Forum Moderators: phranque
the best way of doing this is by using what is called a 301 Permanent redirect - try googleing for it or even a webmasterworld search. It will allow you to 'transfer' the Google PR to the new domain
If all your pages will keep the same name but just change domain you might want to look into the 301 RedirectMatch as well.
Hope this helps
try googleing site:www.webmasterworld.com 301 permanent redirect
I just remembered that, if your existing page has a .php extension, you could use it to redirect people and it would have the same effect as if it was an .htaccess 301 permanent redirect.
this is the code to do so:
<?php
header("HTTP/1.1 301 Moved Permanently");
header("Location: ht tp://www.yournewsite.com");
exit();
?>
hope this helps
[webmasterworld.com...]
it should go in a file that you call .htaccess that you have to put at the root level of your site. Check with your hosting company if one already exist - it should - and simply add the line(s) JdMorgan wrote modified to suit your own case.
hope this helps.