Wordpress Mod_Rewrite Help Needed With Domain Change

Discussion in 'Server / Technical Administration Tips and Queries' started by mneylon, Jan 13, 2017.

  1. mneylon

    mneylon Administrator Staff Member

    I recently switched domains and permalinks on one of my blogs and have hit a problem with *some* of the redirects: Mod_Rewrite Help Needed!!

    Anyone got any ideas on what I'm missing with the existing mod_rewrite rules?
     
  2. unrealindeed

    unrealindeed Administrator Staff Member

    I guess we can mark this one as solved now :). Adding the below mod_rewrite rules in Apache on the original site's server does the trick. Thanks to dr1ss for their help.

    Code:
    RewriteRule ^/blog/?$ https://michele.blog [R=301,L]
    RewriteRule ^/blog/ https://michele.blog%{REQUEST_URI} [R=301,L]
     
    mneylon likes this.
  3. mneylon

    mneylon Administrator Staff Member

    Yeah - thankfully :) Thanks for your help!
     
    unrealindeed likes this.

Share This Page