cancel
Showing results for 
Search instead for 
Did you mean: 

Multi Site - .htaccess redirect question https

Multi Site - .htaccess redirect question https

Greetings,

 

I have two sites set up in our Magento, both use SSL. But I have a problem that http request for the second site (domain2) get redirected to the first site. I have tried using the following code, but I guess it conflicts.

 

RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R,L]

 

Im not very skilled when it comes to .htaccess and hope anyone here can help me sort this out.

 

This is the current relevant content in my .htaccess

 

 

SetEnvIf Host .*domain2.* MAGE_RUN_CODE=domain2
SetEnvIf Host .*domain2.* MAGE_RUN_TYPE=website

<IfModule mod_php5.c>
    php_value memory_limit 256M
</IfModule>


<IfModule mod_rewrite.c>
    Options +FollowSymLinks
    RewriteEngine on

    RewriteRule ^api/rest api.php?type=rest [QSA,L]

    RewriteCond %{REQUEST_METHOD} ^TRAC[EK]
    RewriteRule .* - [L,R=405]
    RewriteCond %{REQUEST_URI} !^/(media|skin|js)/
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-l

    RewriteRule .* index.php [L]
</IfModule>

Best regards