WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Ok, here is my setup. I have a Wordpress MU site setup which uses domain mapping.

The root of the site is greatwhitehosting.com.au.

Any other site I add using domain mapping works fine and all sites are set to use the primary DNS name as the primary domain. IE say I have a subdomain site greatwhitehosting.com.au/site1 I have set it's primary domain as site.com and typing this in a browser works perfectly fine so this means domain mapping is working correctly.

The issue I have is that I want to use my certificate (assigned to greatwhite) for authentication on these domains FOR THE ADMIN SECTION ONLY. This is possible by configuring domain mapping to redirect the admin control panel to greatwhitehosting.com.au/site1. Again this works perfectly fine if I manually browse to https://greatwhitehosting.com.au/site1/wp-login.php.

Now here is the issue - I want all http traffic to admin sections (logins etc) to be over a https. I have heard this is possible using rewrite rules in Apache. I have found the code and added it to my httaccess file as follows:

RewriteCond %{HTTPS} !=on

RewriteRule ^wp-login\.php$ https://greatwhitehosting.com.au/wp-login.php [R=301,L]

The problem I have is that two redirects happen at once and ultimately screw up the redirection. When you use domain mapping and login to the site it tries to redirect you back to site1 using some kind of redirection technique built into the domain mapping plugin. But because Apache also redirects this URL to a https URL it gets screwed up.

How do I fix this?

share|improve this question

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.