• I am having issues with URL redirection on my Multisite. Every URL I enter redirects to one domain and it should not do this.

    I need it to be set up so the domains will redirect(>) like this:

    https://www.domain1.com > https://www.domain1.com
    domain1.com > https://www.domain1.com
    sub.domain1.com > sub.domain1.com
    sub.domain2.com > sub.domain2.com
    sub1.domain2.com > https://www.domain1.com
    sub2.domain2.com > https://www.domain1.com
    sub3.domain2.com > https://www.domain1.com

    Right now each of these redirects to https://www.domain1.com.

    Any help would be much appreciated. I can do these redirects all day long in a web.config file, but working in a .htaccess is new to me.

    This is my current .htaccess file:

    RewriteEngine On
    
    RewriteCond %{HTTP_HOST} !^(www\.domain1\.com)?$
    RewriteRule (.*) https://www.domain1.com/$1 [R=301,L]
    
    #BEGIN WORDPRESS
    RewriteEngine On
    RewriteBase /
    
    RewriteRule ^index\.php$ - [L]
    
    # add a trailing slash to /wp-admin
    RewriteRule ^wp-admin$ wp-admin/ [R=301,L]
    
    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^ - [L]
    RewriteRule ^(wp-(content|admin|includes).*) folder/$1 [L]
    RewriteRule ^(.*\.php)$ folder/$1 [L]
    RewriteRule . index.php [L]
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Redirects in htaccess’ is closed to new replies.