redirect https to http

Discussion in 'Apache' started by cyborgprime, Apr 2, 2010.

  1. #1
    I have a question, but first some background info:

    I have a site that has a regular version (on port 80) and a secure version (on port 443). The site content is alwys changing and the developers put php scripts in carzy places, so I just setup a redirect on the port 80 site to always point to the same page on the 443 site. This has been working fine

    At the moment the site security certificate is in the process of being renewed and I want to redirect any requests to https (443) to go to the same page on http (80). Now, while I got the forwarding to the 443 working, I cannot get the reverse to work.

    So how can I redirect calls from:
    https://www.mydomain.com/*

    to:
    http://www.mydomain.com/*

    Thanks in advance for your help.
     
    cyborgprime, Apr 2, 2010 IP
  2. esupportsnet

    esupportsnet Greenhorn

    Messages:
    34
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    16
    #2
    Have you tried this?

    Options +FollowSymlinks
    RewriteEngine on
    RewriteCond %{SERVER_PORT} ^443$
    RewriteRule ^(.*)$ http://www.yourdomain.com/$1 [R=301,L]
     
    esupportsnet, Apr 8, 2010 IP