homepage Welcome to WebmasterWorld Guest from 54.196.201.253
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Code, Content, and Presentation / Apache Web Server
Forum Library, Charter, Moderators: Ocean10000 & incrediBILL & phranque

Apache Web Server Forum

    
Blocking ip on cluster server
How to optimize .htaccess file
FromBelgium




msg:3856958
 8:35 pm on Feb 24, 2009 (gmt 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

 

wilderness




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

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

jdMorgan




msg:3857040
 10:02 pm on Feb 24, 2009 (gmt 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

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / Apache Web Server
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved