Forum Moderators: open
To kick start it I linked to some of its pages like this:
oldsite/cat1/subcat1 -> newsite/oldsitecountry/cat1/subcat1
oldsite/cat2/subcat2 -> newsite/oldsitecountry/cat2/subcat2
well enough, only I made a mistace to link from a city index as well. I removed it within hours but google had already picked up many of hte links. They went like this:
oldsite/city1/cat1/subcat1 -> newsite/oldsitecountry/city1/cat1/subcat1
oldsite/city2/cat2/subcat2 -> newsite/oldsitecountry/city2/cat2/subcat2
To prevent the pages to show garbage I have temporarily doen met refreshes from
newsite/oldsitecountry/city1/cat1/subcat1
to
newsite/oldsitecountry/cat1/subcat1
now I'd like to take city1 through cityxxxx fomr a database and do a mod_rewrite for these URLs, a 301 for a month and then remove it again to put google back on its track and avoid any penalisations for bad 404 links.
How would that work?
S. N.
RewriteRule /(.*) [newsite.com...] [R=301,L]
From what you've posted, I couldn't figure out what you need to accomplish with 200-800 rewrites. But, just as an example of how to do multiple redirects with one RewriteRule, here's a rule to replace your meta-refreshes, described as:
newsite/oldsitecountry/city1/cat1/subcat1
to
newsite/oldsitecountry/cat1/subcat1
RewriteRule ^/newsite/oldsitecountry/city1/([^/]*)/(.*) /newsite/oldsitecountry/$1/$2 [R=301,L]
More info: Introduction to mod_rewrite [webmasterworld.com]
HTH,
Jim