RE: Blocking Requests Based Off of HTTP Headers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Thank you for the quick response; that did the trick. I tend to be blind
sometimes when a problem thwarts me for awhile, just need another set of eyes
:)



-----Original Message-----
From: jslive@xxxxxxxxx [mailto:jslive@xxxxxxxxx] On Behalf Of Joshua Slive
Sent: Thursday, February 08, 2007 3:22 PM
To: users@xxxxxxxxxxxxxxxx
Subject: Re:  Blocking Requests Based Off of HTTP Headers

On 2/8/07, Adam Serediuk <aserediuk@xxxxxxxxxxxx> wrote:

>
> RewriteCond   ${hosts-deny:%{true-client-ip}|NOT-FOUND}
> !=NOT-FOUND
>
> RewriteRule   ^/.*  -  [F]

> If the REMOTE_HOST or REMOTE_ADDR matches the contents of the hosts.deny
> file, the block works. However, if I set an HTTP header for true-client-ip
> it does not match. I've tried a number of combinations and cannot get this
> to work as expected. I know that the true-client-ip header exists, as I am
> using it to log information into a log file successfully.

You would need to use %{HTTP:true-client-ip}, as noted in the RewriteCond
docs.

Joshua.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx



[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux