Jump to content

htaccess, pulling my hair out!


herghost

Recommended Posts

Hi all,

 

I am trying to redirect a wp blog to a new site, including links

 

Basically say my link is like myblog.com/cat/post/

 

and I want it to redirect to myblog1.com/cat/post/

 

at the moment, I have this

 

Options +FollowSymLinks
RewriteEngine on
RewriteCond %{HTTP_HOST} ^blog1\.co.uk [NC,or] 
RewriteCond %{HTTP_HOST} ^www.blog1\.co.uk [NC,or] 
RewriteRule ^(.*)$ http://www.blog2.com/$1 [R=permanent,L]

 

However when this link is clicked, the redirect takes me to the index of blog2, how do I keep the info after? eg the /cat/post?

 

The filesystem is identical for both sites

 

Cheers

Link to comment
https://forums.phpfreaks.com/topic/229288-htaccess-pulling-my-hair-out/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.