httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rudolf Wolf <>
Subject Mod_rewrite + HTTPS + Apache 2.0.39
Date Wed, 26 Jun 2002 14:57:59 GMT
I have a problem with mod_rewrite. I would like to have a some directory accessible only via
HTTPS from Internet. I found some tips on Apache web site, how to do it.
#   Force clients from the Internet to use HTTPS
RewriteEngine        on
RewriteCond          %{REMOTE_ADDR} !^192\.168\.1\.[0-9]+$
RewriteCond          %{HTTPS} !=on
RewriteRule          .* - [F]

The main part is above. This was not working and when I saw to  the log, I could  see, that
the problem is, that the HTTPS variable is not fill by any value. I've tried some other variables
and result is: all 'HTTP' variables as REMOTE_ADDR etc. are working properly, but any "HTTPS"
variables are filled. Then I try the same configuration on Apache 1.3.24 and everything was
 working OK. 

The log is: - - [26/Jun/2002:16:40:48 +0200] [][rid#8250490/initial]
(4) RewriteCond: input='' pattern='!^192\.168\.201\.14$' => matched - - [26/Jun/2002:16:40:48 +0200] [][rid#8250490/initial]
(4) RewriteCond: input='' pattern='!=on' => matched REMARK this is %{HTTPS}  variable - - [26/Jun/2002:16:40:48 +0200] [][rid#8250490/initial]
(2) forcing '/var/www/htdocs/subarea/intra.html' to be forbidden

Rudolf Wolf.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message