simple http to https

Topics: User Forum
Sep 26, 2012 at 4:44 PM

What should be a simple rewrite is not working. Our website and domain name are the same, so on each domain controller we redirect requests of http://oursite.org to http://www.oursite.org using IIS6. I wanted to do https also, so I installed the IIRF, tested and verified it's working. What I want to do is send all http://oursite.org to http://www.oursite.org just as I'm currenlty doing via IIS. Additionally, I just want to send all https://oursite.org requests to https://www.oursite.org. I've tried a bunch of iterations, so here's a random one.

RewriteCond %{HTTPS} on

RewriteCond %{SERVER_PORT} ^443$

RedirectRule ^(.*)$ https://www.oursite.org/$1

RewriteCond %{HTTPS} off

RewriteCond %{SERVER_PORT} ^80$RedirectRule ^(.*)$ http://www.oursite.org/$1