WordPress.org

Forums

301 redirect other CMS to WordPress (2 posts)

  1. mairaj
    Member
    Posted 2 years ago #

    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:

    http://www-domain-com/index.php?p=1_1_String-of-Few-Words
    http://www-domain-com/index.php?p=1_2_Here-Are-Few-Words
    http://www-domain-com/index.php?p=1_3_Yet-Another-Example

    I'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 (.*) http://newwpsite-com/string-of-words/ [R=301,L]

    RewriteCond $1 ^index\.php$ [NC]
    RewriteCond %{QUERY_STRING} ^p=1_2$ [NC]
    RewriteRule (.*) http://www.example.com/here-are-few-words/ [R=301,L]

    RewriteCond $1 ^index\.php$ [NC]
    RewriteCond %{QUERY_STRING} ^p=1_3 [NC]
    RewriteRule (.*) http://www.example.com/yet-another-example/ [R=301,L]

    The Problem :
    When I check the 301 redirect using some online tool its says:
    http://www-domain-com/index.php?p=1_1_String-of-Few-Words
    Redirecting to

    http://newwpsite-com/string-of-words?p=1_1_String-of-Few-Words

    Then, if I check
    http://newwpsite-com/string-of-words?p=1_1_String-of-Few-Words
    It is redirecting to the correct url as:
    http://newwpsite-com/string-of-words

    Is 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

  2. Krishna
    Volunteer Moderator
    Posted 2 years ago #

    The redirects do not work for me. Can you check again?

Topic Closed

This topic has been closed to new replies.

About this Topic