I wish to block access to any file with name "modules.php" in any website. I have written a Rule in mod security but I'm not sure if it is working or not? here is the rule
SecRule REQUEST_LINE "@rx modules.php" \
"phase:2,block,severity:2,msg:'Blocking access to modules.php files.'"
Is that correct?
It will work. Instead REQUEST_LINE to REQUEST_FILE for better performance.