Portal Home > Knowledgebase > Articles Database > modsecurity 2 - Negative rules and exception rules


modsecurity 2 - Negative rules and exception rules




Posted by hostinginsiders, 07-20-2010, 08:28 AM
Hi how do I write negative rules and exceptions from rules. Let's say I have: SecRule REQUEST_URI "wp-cron.php" but I want to make an exception from this rule so that the domain domain.com can still use wp-cron.php. How would I write the exception ? Something like: SecRule REQUEST_URI "wp-cron.php" chain SecRule HTTP_HOST NOT domain.com or SecRule REQUEST_URI "wp-cron.php" chain SecRule HTTP_HOST domain.com ALLOWED I just don't know the syntax but I guess you know what I mean. Thanks

Posted by madaboutlinux, 07-20-2010, 08:38 AM
Enter the following code in the VirtualHost of the domain OR in the .htaccess file The path should start from the directory inside the public_html folder i.e. if the file is at public_html/wp-cron.php, just mention the LocationMatch as "wp-cron.php". Replace xxxxxxx with the mod security rule ID which you can retrieve from the "modsec_audit.log".



Was this answer helpful?

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

Also Read
BIND question (Views: 790)
FDC Servers? (Views: 824)
ResellerZoom Review (Views: 894)


Language:

LoadingRetrieving latest tweet...

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