Post by coolshop » Fri Jun 26, 2020 9:03 am

We have 2 sites on multisite 2.3.0.2

Default site, and site that admin runs under is
https://www.domaina.com
https://www.domaina.com/admin

Second site is:
https://www.domainb.com

Both point to the same opencart directory

We are shutting down the first site and continuing to run the second site.

Since both sites point to one directory with the same .htaccess, how do we need to setup .htaccess to 301 redirect all traffic to https://www.domaina.com to https://www.domainb.com EXCEPT https://www.domaina.com/admin (so that we can keep running the admin)

Any help or advice appreciated!

New member

Posts

Joined
Sun Sep 09, 2012 10:31 am

Post by netruxa » Sat Jun 27, 2020 4:06 am

hello
try this code:

RewriteEngine on
RewriteCond %{HTTP_HOST} ^www.domaina.com$
RewriteCond %{REQUEST_URI} !^/admin
RewriteRule ^(.*) https://www.domainb.com/$1 [L,R]

User avatar
New member

Posts

Joined
Fri Dec 16, 2016 1:34 pm


Post by coolshop » Sun Jun 28, 2020 9:46 am

That worked - thank you!!

New member

Posts

Joined
Sun Sep 09, 2012 10:31 am
Who is online

Users browsing this forum: bizco and 164 guests