httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rudolf Wolf <rudolf.w...@dantax.cz>
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:
192.168.201.15 - - [26/Jun/2002:16:40:48 +0200] [sova.dantax.cz/sid#81d22f8][rid#8250490/initial]
(4) RewriteCond: input='192.168.201.15' pattern='!^192\.168\.201\.14$' => matched
192.168.201.15 - - [26/Jun/2002:16:40:48 +0200] [sova.dantax.cz/sid#81d22f8][rid#8250490/initial]
(4) RewriteCond: input='' pattern='!=on' => matched REMARK this is %{HTTPS}  variable
192.168.201.15 - - [26/Jun/2002:16:40:48 +0200] [sova.dantax.cz/sid#81d22f8][rid#8250490/initial]
(2) forcing '/var/www/htdocs/subarea/intra.html' to be forbidden

Thanks,
Rudolf Wolf.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message