Home 301 redirect old indexed URLs
Reply: 0

301 redirect old indexed URLs

user1576 Published in August 14, 2018, 8:27 am

My client had a wordpress blog at "domain.com/blog" with permalink structure "?p=page-id". I archived this site at "v1.domain.com". everything works fine.

I create the new wordpress blog at "domain.com/blog" with permalink structure "/year/month/postname". still, everything fine.

I did a google search and found the old blog posts. they link to "domain.com/blog?p=page-id" and when single.php tries to open these files the loop goes crazy.

here is an example: http://davidapuzzo.com/blog/?p=1821

if you add "v1" to the beginning of the domain, you will see where the post actually is:


I understand It would be a 301 redirect that finds all "http://domain.com/blog?p=page-id" URLs and redirect/prepends them with "v1.domain.com..." ? I just dont know how to write the reg expression and where to add it within my wordpress .htaccess file.

I've included my wordpress .htaccess below:

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
# END WordPress

My client has some deep indexed URLs, as you can see above with the Connecticut Weatherman/Meterologist. that post is the 6th result on the first page of results for a search on his name.

The new site was launched today and any help would be greatly appreciated. Thanks!

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.422674 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO