IP Banning Through .htaccess

Setting up your error documents through the .htaccess file is easier than one might think. Here’s an example of what you would want to cut and paste into your .htaccess file:



ErrorDocument 400 /errors/400.html
ErrorDocument 401 /errors/401.html
ErrorDocument 403 /errors/403.html
ErrorDocument 404 /errors/404.html
ErrorDocument 500 /errors/500.html

This tells the server that each of these errors pages are in the /errors/ folder and the exact file that needs to be seen when somebody encounters that error.

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request


Please sign in to leave a comment.