Welcome to WebmasterWorld Guest from 107.21.149.142

Forum Moderators: Ocean10000 & incrediBILL & phranque

Message Too Old, No Replies

Blocking ip on cluster server

How to optimize .htaccess file

     
8:35 pm on Feb 24, 2009 (gmt 0)

Junior Member

10+ Year Member

joined:Apr 14, 2004
posts:111
votes: 0


I use cluster server and below is only option to Block IP's.
Is there a way to make the very long file shorter?
How can I block an IP range with this method?

SetEnvIf X-Cluster-Client-Ip 11.1.11.111 block
SetEnvIf X-Cluster-Client-Ip 11.1.11.112 block
SetEnvIf X-Cluster-Client-Ip 11.1.11.113 block
SetEnvIf X-Cluster-Client-Ip 11.1.11.114 block
SetEnvIf X-Cluster-Client-Ip 11.1.11.115 block
SetEnvIf X-Cluster-Client-Ip 11.1.11.116 block
'
'
Deny from env=Block

9:43 pm on Feb 24, 2009 (gmt 0)

Senior Member

WebmasterWorld Senior Member wilderness is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Nov 11, 2001
posts:5459
votes: 3


I don't have a clue what cluster server is!

#SHOULD deny 11.1.11.0-2555
SetEnvIf X-Cluster-Client-Ip 11.1.11. block

10:02 pm on Feb 24, 2009 (gmt 0)

Senior Member

WebmasterWorld Senior Member jdmorgan is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Mar 31, 2002
posts:25430
votes: 0


SetEnvIf uses regular expressions, so

SetEnvIf X-Cluster-Client-Ip ^11\.1\.11\.11[1-6]$ block

replaces all six lines, as well as correcting the unanchored pattern and un-escaped literal periods.

This assumes that the X-Cluster-Client-Ip variable is defined within the scope where this SetEnvIf directive executes.

Jim

 

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members