• Hello, any help with this problem would be greatly appreciated.

    Have migrated WP and all content from old domain to new.

    Right now we have exactly matching URLs e.g.

    olddomain/?p=369
    newdomain/?p=369

    So the easy .htaccess code to 301 the whole thing is

    RewriteEngine on
    RewriteRule ^(.*)$ https://www.newdomain.com $1 [R=301,L]

    Ok all very good, BUT I need to change the new domain urls to the SEF pretty permalinks, while at the same time preserving the (massive) SEO value from the old site. (If I change to pretty permalinks on the old domain, concerned about losing that.)

    So the question is, what is the best way to handle the old to new urls redirects e.g.

    olddomain/?p=369
    to
    newdomain/the-post-name

    Is there a simple RewriteRule I can use in the old site .htaccess file? And if so, what is it?

    Thanks for help!

Viewing 3 replies - 1 through 3 (of 3 total)
  • olddomain/?p=369
    to
    newdomain/the-post-name

    I don’t think there is any automatic way for 301 like this. you need to change it manually (later is better then never…).

    Thread Starter timmelody

    (@timmelody)

    Ok so if I do that, do I still need to add the

    RewriteEngine on
    RewriteRule (.*) https://www.newdomain.com/$1 [R=301,L]

    and then each individual ulr after?

    Or do I simply add each indivdual url

    Redirect 301 /?p=369 https://www.newdomain.com
    Redirect 301 /?p=370 https://www.newdomain.com
    etc.

    you add each individual url…

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘301 Redirect Old Domain to New with Different URLs’ is closed to new replies.