Quantcast
Channel: WordPress.org Forums » All Posts
Viewing all articles
Browse latest Browse all 112466

RonStrilaeff on "Permanent URL Redirect"

$
0
0

Thanks guys.

Here is my write up of how I plan to proceed.

And so you don't have to follow that link, here is the redirect code I'm going to use (the 302 will become a 301):

RewriteEngine on
RewriteCond %{HTTP_HOST} ^([^.:]+\.)*testsyte1\.com\.?(:[0-9]*)?$ [NC]
RewriteRule ^(.*)$ http://one.testyng.com/$1 [R=302,L]
RewriteCond %{HTTP_HOST} ^([^.:]+\.)*testsyte2\.com\.?(:[0-9]*)?$ [NC]
RewriteRule ^(.*)$ http://two.testyng.com/$1 [R=302,L]

It works very well on my test sites. The live sites will be a bit more complicated since most of the content is in 3rd party tables and needs to be converted to a new custom post type.

But that's for another day.


Viewing all articles
Browse latest Browse all 112466

Trending Articles