How can you redirect HTTPS to HTTP?. That's, the alternative of the items (apparently) everybody shows.

I've got a server on HTTPS that I compensated an SSL certification for along with a mirror that I've not and around just for for problems therefore it does not merit obtaining a certification for.

On my small client's desktop computers I've SOME cutting corners which indicate http://production_server and https://production_server (both work). However, I understand when my production server goes lower, then DNS sending takes over and individuals clients that have "https" on their own shortcut is going to be looking at https://mirror_server (which does not work) along with a large body fat Ie 7 red-colored screen of uneasyness for my opportunity.

Regrettably, I can not just switch this around in the client level. These customers are extremely computer illiterate: and therefore are certainly going to panic from seeing HTTPS "insecurity" errors (particularly the way Opera 3 and Ie 7 handle it nowadays: FULL STOP, type of fortunately, although not helping me here LOL).

It's very easy to locate Apache solutions for http->https redirection, as well as the existence of me I can not target your product.


This is not examined however i think this will work using mod_rewrite

RewriteEngine On

RewriteCond % on

RewriteRule (.*) http://%%

Bear in mind the Rewrite engine only takes over when the HTTP request continues to be received - and that means you would still require a certificate, to ensure that the customer to setup the bond to transmit the request over!

If however the backup machine will have the symptoms of exactly the same hostname (so far as the customer is worried), then tthere shouldn't be reason you cannot make use of the same certificate because the primary production machine.

ejunker's first got it right. For the good examples which have you redirect from port 80, substitute port 443 because the conditional.

I am presently tring to direct http://server1 to http://server2. Because server1 is https it ought to be https://server1 to http://server2.

After I attempted the code on my small server,

RewriteCond % on

RewriteRule (.*) <http://%>%

my server isn't redirecting it. Actually, there is no sign in rewrite.log despite the fact that I have place it to level 9.

After a little tests, it might appears the spinning does not work when it is https. There is no log whatsoever. Basically revert to http://server1, then your log arrived on the scene.

Same with it when https can be used, the redirecting does not work? That could not be simply because others get it going. However, why there is no rewrite.log?


After more tests, I discovered that since the httpd.conf place the SSL code in another file (there is a line which states Include conf/extra/httpd-ssl.conf) I have to place the rewrite code within the httpd-ssl.conf file rather. The rewrite log is showing.