You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Rudolf Wolf <ru...@dantax.cz> on 2002/07/02 13:39:42 UTC

Rewrite + Apache 2.0.39 + HTTPS again

I'm writing again, because I didn't get any answers and before writing to bug report I want to be sure, that the problem is not me.
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 not 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