Forum Moderators: phranque
I am not sure if I even have this correct in the syntax.. using
I am unable to get remote host to work.
RewriteEngine On
RewriteCond %{REMOTE_HOST} ^.somedomain\.net$ [OR]
RewriteCond %{REMOTE_ADDR} ^68\.50\.*
RewriteRule .* [gingsouthwoop.com...] [R=301,L]
It works for banning with Remote_Addr but thats not what I want.
I want to ban based the host, aol.com .... AND anybody from
that domain (or simialar) I don't want to use IP addresses because
as you know aol.com (and others) are always changing.
So the question(s) is,
1.) do I even have the syntax correct for remote_host
and
2.) are there wild cards for the remote_host so if a somebody comes in
as cache-rh05.proxy.aol.com they get banned the same as
cache-by12.proxy.aol.com
the aol.com people... or similarily where the remote host changes from
time to time like this will pcp000000pcs.retard01.va.comcast.net
but the comcast.net stays the same.
thanks a bunch for your help group...
Chalupee
The problem is that you have start-anchored your remote_host string, and it will match only a remote hostname meeting the following pattern:
"Any single character followed by the exact string 'somedomain.net'"
The "^" and "." are special characters to the regular expressions [etext.lib.virginia.edu] parser used by mod_rewrite.
I would recommend that you re-think using remote_host to block access. You will force your server to do a reverse-DNS lookup for every single page, image, and script requested from it. This is very, very slow. You might consider going to ARIN once a month and looking up all of the IP ranges assigned to the entities you don't like, and including those IP ranges in your .htaccess file ban list.
Jim
On another company's server I use I tested
what we were working on and just a simple ssi command
to return the remote_host.
Works fine on the other company servers but not
the one I want it too work on, so I'll see later today
what happens when I get the next response back from tech.
I apologize for not proplerly testing my company's server
and relying on just what they told me.
Thanks again.
Chalupee.