How can write a mod_rewrite rule to determine if the domain is not the main domain then change https:// to http://
Posted
by
Oudin
on Server Fault
See other posts from Server Fault
or by Oudin
Published on 2012-10-21T13:22:11Z
Indexed on
2012/10/21
17:03 UTC
Read the original article
Hit count: 234
I've set up a WordPress multi-site with a wildcard ssl for example.com to access the admin area securely. However I'm also using domain mapping to map other domains to other sites e.g. alldogs.com to alldogs.example.com.
The problem is when I'm trying to access the front end of a site from and admin for a mapped domain e.g. alldogs.com by clicking "Visit Site" the Link goes to https://alldogs.com because of the forced ssl applied to the admin area. Which produces a certificate warning since the certificate is for example.com and not alldogs.com.
How can write a mod_rewrite rule to determine if the url/link clicked on is not the main domain e.g. example.com then change the https:// to http:// so the site can be accessed via port 80 and not generate a certificate warning for that mapped domains
© Server Fault or respective owner