301 from example.com/blog to example2.com/blog
Posted: Wed Mar 19, 2008 7:03 pm
I am trying to get 301 redirect to work so that my old links in google at example.com/blog/... are 301'd to example2.com/blog/...
I have a .htaccess in my root directory and ofcourse the one in the serendipity directory (/blog). Which should I edit?
I currently have the following in my example.com/.htaccess
rewritecond %{http_host} ^www.example.com [nc]
rewriterule ^(.*)$ http://www.example2.com/$1 [r=301,nc]
rewritecond %{http_host} ^example.com [nc]
rewriterule ^(.*)$ http://www.example2.com/$1 [r=301,nc]
These are hosted on the same site. I simply changed my domainname. Everything works fine except my blog (including other subdirs) so I know it is because of the /blog/.htaccess.
Any help would be greatly appreciated.
Thanks,
Randy
I have a .htaccess in my root directory and ofcourse the one in the serendipity directory (/blog). Which should I edit?
I currently have the following in my example.com/.htaccess
rewritecond %{http_host} ^www.example.com [nc]
rewriterule ^(.*)$ http://www.example2.com/$1 [r=301,nc]
rewritecond %{http_host} ^example.com [nc]
rewriterule ^(.*)$ http://www.example2.com/$1 [r=301,nc]
These are hosted on the same site. I simply changed my domainname. Everything works fine except my blog (including other subdirs) so I know it is because of the /blog/.htaccess.
Any help would be greatly appreciated.
Thanks,
Randy