httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Denis <>
Subject Re: mod_rewrite questions
Date Fri, 03 May 2002 11:55:46 GMT
On Friday 03 May 2002 12:50 pm, Owen Boyle wrote:
> what's the "!" for? Are you not negating the pattern match? In the

Whoops ! You're definitely right.. 
However I have been fiddling around with this before, and didn't manage to 
sort out any rules as basic as that anyway.. 

> What you want is even simpler:
>  	RewriteRule ^http://*  - [F]

Given these rewritelog entries for this request 
"GET" :
.. init rewrite engine with requested uri /index.html
.. applying pattern '^http://*' to uri '/index.html'
.. pass through /index.html

It seems the RewriteRule doesn't see all of THE_REQUEST meaning this would not 
work.. The RewriteCond can match on environment vars though so this seems to 
work better for me : 

  RewriteCond %{THE_REQUEST}            ^GET\ http://.*$
  RewriteRule .*                        403.html        [F]

Thanks for reminding me about the negating error, that was definitely the 
stupid thing I was messing it up with, and thanks to you I now have a working 
rule it seems :)

Denis Braekhus - ABC Startsiden AS

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

View raw message