Prevent attempt to GET custom error message of certain HTTP errors

consultant

Member
Nov 18, 2015
6
0
1
Seattle
cPanel Access Level
Root Administrator
I've got a ModSecurity rule to precent referrer spam. It returns an error 406. However I also see that Cpanel is configured to try to GET /406.shtml so you can create a custom error message screen under that file. I don't want the server to attempt to get that file everytime a 406 error is thrown (but I may want to create custom 404 and 500 and other error messages). How to disable attempt to get custom error page for certain error numbers?