The problem here is that by mistake, a few days back, i 301 redirected :
www.example.com/olddata/ to www.example.com/newdata/
Actually its was supposed to be 301 redirected:
www.example.com/olddata/ to subdomain.example.com/newdata/
Now www.example.com/newdata/ has been indexed by SE also.
My requirement is the following together :
1> 301 redirect :
www.example.com/olddata/ to subdomain.example.com/newdata/
2> 301 redirect :
www.example.com/newdata/ to subdomain.example.com/newdata/
I have the following code that works fine for my first need :
RewriteRule ^olddata/$ [
subdomain.example.com...] [R=301,L]
RewriteRule newdata/([^/]+)$ [
subdomain.example.com...] [R=301,L]
RewriteRule newdata/ common-code-for-newdata-and-olddata-display-content.php
I am not being able to get the second redirect to work. To make matters worse, the URLs for my second redirect is of the same name and structure. Please see the note below to understand the real problem.
Note : The folder for www.example.com and subdomain.example.com is the same. So both main domain and subdomian share same data as well as same .htaccess file.
Please guide.