cancel
Showing results for 
Search instead for 
Did you mean: 

SSL everywhere, multi-site, www and non-www

SSL everywhere, multi-site, www and non-www

Any rewrtie guru able to help on dealing the the .htaccess rewrites for this?

 

www.site1.com - front end store

www.site2.com - front end store

admin.site1.com - hosts the Magento admin that serves both front end stores

 

What I need to achieve in htaccess redirects - 

1 - redirect all incoming links from "http://site1.com/page" and http://www.site1.com/page" to "https://www.site1.com/page"

2 - the same as above for site2.com

3 - keep the admin URL as https://admin.site1.com

 

I can achieve 1 & 2, but my redirects also change 3 to redirect to https://www.admin.site1.com/

 

How can this be achieved without adding a www to every domain?

3 REPLIES 3

Re: SSL everywhere, multi-site, www and non-www

Hi @lewisa,

 

That's basically a webserver configuration problem.

Which webserver are you using?

Re: SSL everywhere, multi-site, www and non-www

Hi Damian

 

It's on Apache.

 

https://wiki.apache.org/httpd/RewriteHTTPToHTTPS - this solution works, however it doesn't redirect http://site1.com to https://www.site1.com...

 

 

 

If I introduce a rule to forward it to the www domain, then the admin.site1.com domain is also affected and is redirected to www.admin1.site1.com

 

I need to exclude the admin.site1.com from being redirected to www.admin.site1.com, while all of the other sites are directed to the www version.

 

 

Re: SSL everywhere, multi-site, www and non-www

Hi @lewisa,

 

What if you set the unsecure url as secure?

In that way Magento will try to run only under https.

 

(An extra question: which type of cace are you using with your store?)