Hopefully this helps someone as it was driving me insane for the last few weeks. Every time I clicked the Empty Spam button via WordPress comments it would just redirect me to my website root. Server Error logs, wp_debug produced nothing – no errors or issues of any kind. The WP Super cache emptying Cache shortcut would also produce the same result.
- The Server exhibiting this behavior had the Cpanel default OWASP ModSecurity Core Rule Set enabled in Modsecurity.
- The Server without this issue had the more extensive Comodo ModSecurity Ruleset applied.
After disabling OWASP and replacing it with Comodo the problem magically went away. You can find the details how to add this ruleset right here which should take the best part of 10 seconds: Comodo ModSecurity Ruleset WHM/CPANEL.