Try adding:
RewiteCond %{REQUEST_URI} !~ m/(homepage|techsup1|techsup2)\.html$/

which tells the server don't redirect to HTTPS provided the requested uri is not the homepage or tech support pages. i hope this helps ;)

Or maybe just put your secure pages in a different directory and use the SSLRequire directive in that specific directory.
 

-Carlos

Haroon Rafique wrote:

I have been reading the archives for a while now and didn't see any solution
to my problem. So here goes... Thank in advance for any solutions

To force people to use https instead of http, I could use the mod_rewrite as
follows (all is theoretical, I don't have access to apache or apache with
mod_ssl right now, so please bear with me):

RewriteEngine On
# use log level 9 for most verbose 0 for least
RewriteLogLevel 9
RewriteLog "/etc/httpd/logs/rewrite.log"
RewriteCond %{HTTPS} !=on
RewriteRule ^/(.*) https://%{SERVER_NAME}/$1 [R,L]

It is absolutely essential to give the user the ability to see the homepage
as regular http (and a few tech support pages) in case they have SSL turned
off, or are using lynx without SSL support. Otherwise, if I blindly forward
all http requests to https how would they know they're supposed to use SSL
when they're using a non-SSL browser.

Is it possible to not have a RewriteCond which prevents the RewriteRule to
execute to take care of the above situation? Am I missing something obvious?

Thanks,
--
Haroon Rafique <[EMAIL PROTECTED]>

______________________________________________________________________
Apache Interface to OpenSSL (mod_ssl)                   www.modssl.org
User Support Mailing List                      [EMAIL PROTECTED]
Automated List Manager                            [EMAIL PROTECTED]

-- 
-----------------------------------------------------------------------
Carlos Ramirez + Boeing + Reusable Space Systems + 714.372.4181
-----------------------------------------------------------------------
-- Don't make me use uppercase
 


Reply via email to