Redirect Wordpress multisite to use new domain — CyberPanel - WebHosting Control Panel for OpenLiteSpeed
CyberHosting

Redirect Wordpress multisite to use new domain

Hello, people, I need help creating htaccess redirects to redirect a wordpress multisite from one domain to a wordpress multisite on a new domain. I need to redirect https://domaina.com to https://domainb.com and https://*.domaina.com to https://*.domainb.com , and https://*.domaina.com/* to https://*.domainb.com/*
Anyone can help me ?

Comments

  • Replying to myself:

    #redirect subdomains
    RewriteCond %{HTTP_HOST} ^((?!www).+)\.sitea.com$
    RewriteRule ^(.*)$ http://%1.siteb.com/$1 [L,R]

    #redirect domain

    RewriteCond %{HTTP_HOST} ^(www\.)?sitea.com$
    RewriteRule ^(.*)$ http://siteb.com/$1 [L,R]

    That is what is working for my cyberpanel..
Sign In or Register to comment.
CyberPanel Discord

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion