Forum Replies Created

Viewing 1 replies (of 1 total)
  • Hi there, I too have mapped domains and trying to keep the www on each domain by making a change to the htaccess file.

    I have tried adding each domain www redirect to the htaccess as suggested above but when I visit the site it says there is a redirect loop.

    Can someone please help.

    RewriteEngine On
    # www redirect
    RewriteCond %{HTTP_HOST} ^domain1.com
    RewriteRule ^(.*)$ https://www.domain1.com/$1 [R=301,L]
    
    RewriteCond %{HTTP_HOST} ^domain2.com
    RewriteRule ^(.*)$ https://www.domain2.com/$1 [R=301,L]
    
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    
    # uploaded files
    RewriteRule ^files/(.+) wp-includes/ms-files.php?file=$1 [L]
    
    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^ - [L]
    RewriteRule . index.php [L]
Viewing 1 replies (of 1 total)