0

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?

Pourya.M
  • 73
  • 1
  • 1
  • 6

1 Answers1

0

It will work. Instead REQUEST_LINE to REQUEST_FILE for better performance.

Wei
  • 86
  • 1
  • 3