The easiest way, assuming modsecurity is on server-wide, would be to add a domain specific vhost includes as outlined in httpd.conf:
Code:
# To customize this VirtualHost use an include file at the following location
# Include "/usr/local/apache/conf/userdata/std/2_4/USERNAME/DOMAIN/*.conf"
Then add the rule to that file and run /scripts/rebuildhttpdconf to make it active.
Optionally, you could append the modsec rule itself instead. To do this, you would add "chain" to the actions of the rule and then an additional rule line with:
Code:
SecRule SERVER_NAME "domain\.com" "t:lowercase"
For example if this was your rule:
Code:
SecRule QUERY_STRING "safe_mode=off" "deny,id:1000847,t:urldecode"
You would change it to:
Code:
SecRule QUERY_STRING "safe_mode=off" "deny,id:1000847,t:urldecode,chain"
SecRule SERVER_NAME "domain\.com" "t:lowercase"
This creates a 2nd condition for the rule requiring it to be for that domain in order to be blocked. The t:lowercase will stop requests from making it through if they capitalize the domain. For the best chance at stopping requests that try to evade your rule(s) the above method of using the domain includes is preferred over modifying the rule.