Hello,
For last few years, I hosted a wp blog at old-domain.com/folderX. Recently, I purchased new-domain.com and I am using the same wp installation at the same location (using the same db, etc.) on my server.
I could get my blog to run smoothly for the past week from new-domain.com/folderX by changing wp variables.
However, since I have several incoming links from external websites, I am trying to redirect all "old-domain.com/folderX" traffic to "new-domain.com/folderX", but I cannot do it.
I tried numerous techniques, for e.g.:
1. changing .htaccess in root folder:
RewriteCond %{HTTP_HOST} ^old-domain\.com$ [NC]
RewriteCond %{QUERY_STRING} ^$
RewriteRule ^folderX$ http:/new-domain.com/folderX? [R=301,L]
2. changing .htaccess in /folderX:
RewriteCond %{HTTP_HOST} old-domain\.com\folderX [NC]
RewriteRule (.*) http:/new-domain.com/folderX/$1 [R=301,L]
I cannot put a blanket 301 for the old-domain because I still use old-domain.com/folderY, /folderZ etc.
Thank you very much in advance.
Priyank