Forum Moderators: phranque
Now my question is the rule given below is suffiecient enough to move all pages and has no problem with Google (or work exactly as per Google instructions)?
RewriteEngine on
RewriteRule ^(.*)$ [newwebsiteurl.in...] [R=301,L]
RedirectMatch 301 /folder/(.*)$ http://www.example.com/folder/$1
RedirectMatch old threads [google.com]
[edited by: jdMorgan at 3:32 am (utc) on Dec. 27, 2009]
[edit reason] Formatting fixed, link simplified. [/edit]
I would point both host names at the same server and would use RewriteRule to create the redirect for all non-canonical host name requests.
That two-line piece of code is posted several times per week here. It has a preceding RewriteCond that checks what host name was requested.