Forum Moderators: phranque
Please see our Apache Forum Charter [webmasterworld.com] for information about how to get the most from this forum, and try a search on WebmasterWorld for SSL, 443, RewriteCond SERVER_PORT, and RewriteRule in various combinations to turn up some very recent threads on rewriting/redirecting SSL requests. Then try to modify the code you find to suit your needs, and post back here if you have any trouble.
As described in our Charter, we're happy to help you write *your* code and test and fix problems, but we cannot write the code for you; Such activity is simply not sustainable given the few contributors and many requestors we have here, and the fact that server-side code is simply not a one-size-fits-all, cut-and-paste proposition. Our Charter also contains links to several useful resources.
Thanks,
Jim
RewriteCond %{HTTP_REFERER} !^https://www.mysite.com [NC]
RewriteRule (.*) [mysite.com...] [L,NC]
Unfortunately it makes my site completely inaccessible.
What I'd like this code to do is redirect any https requests for the homepage only to http.
You'll likely have better luck with something like this:
RewriteCond %{SERVER_PORT} ^443$
RewriteRule ^(index\.html)?$ http://www.example.com/ [R=301,L]
Jim