Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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

 
discard

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

Browse other questions tagged or ask your own question.