Portal Home > Knowledgebase > Articles Database > mod_security rules


mod_security rules




Posted by ManXP, 08-15-2008, 08:19 AM
I just installed mod_security via WHM, and want to know what rule should I enter to prevent some URLs from being opened. For example, if URL contains word "abc" (like domain.com/some_folder/abc/file.php), it should not be opened. Thanks!

Posted by Sam Robertson, 08-15-2008, 09:05 AM
This should work (I haven't written modsec rules for a while.): Or if you want to block multiple words, then you can use this: If you're using apache 1.x then replace SecRule with SecFilter

Posted by ManXP, 08-16-2008, 04:18 AM
Hm after adding this line (SecRule "abc"), I get error: "Syntax error on line 107 of /usr/local/apache/conf/modsec2.user.conf: SecRule takes two or three arguments, rule target, operator and optional action list" Using Apache 2.2. Any ideas?

Posted by MR_MAMI, 08-16-2008, 05:32 AM
in do you use modsec 2 ? rule : it will work ISA..

Posted by ManXP, 08-18-2008, 06:28 AM
Thanks, it did the trick!



Was this answer helpful?

Add to Favourites Add to Favourites    Print this Article Print this Article

Also Read


Language:

LoadingRetrieving latest tweet...

Back to Top Copyright © 2018 DC International LLC. - All Rights Reserved.