301 redirect other CMS to WordPress
-
I’ve moved an old website from an another CMS to WordPress (Even using a new domain name). This website has a good index and reputation in search engines. The URL structure of the website was as follows:
https://www-domain-com/index.php?p=1_1_String-of-Few-Words
https://www-domain-com/index.php?p=1_2_Here-Are-Few-Words
https://www-domain-com/index.php?p=1_3_Yet-Another-ExampleI’m using the following to redirect each url to the new location.
RewriteCond $1 ^index\.php$ [NC]
RewriteCond %{QUERY_STRING} ^p=1_1$ [NC]
RewriteRule (.*) https://newwpsite-com/string-of-words/ [R=301,L]RewriteCond $1 ^index\.php$ [NC]
RewriteCond %{QUERY_STRING} ^p=1_2$ [NC]
RewriteRule (.*) https://www.example.com/here-are-few-words/ [R=301,L]RewriteCond $1 ^index\.php$ [NC]
RewriteCond %{QUERY_STRING} ^p=1_3 [NC]
RewriteRule (.*) https://www.example.com/yet-another-example/ [R=301,L]The Problem :
When I check the 301 redirect using some online tool its says:
https://www-domain-com/index.php?p=1_1_String-of-Few-Words
Redirecting tohttps://newwpsite-com/string-of-words?p=1_1_String-of-Few-Words
Then, if I check
https://newwpsite-com/string-of-words?p=1_1_String-of-Few-Words
It is redirecting to the correct url as:
https://newwpsite-com/string-of-wordsIs the above situation alright where actually two 301 are happening or should I change something in the htacces code?
Thank you for the help.
regards
- The topic ‘301 redirect other CMS to WordPress’ is closed to new replies.