Fork me on GitHub

ImpressCMS allows the automatic handling of HTTP errors. However, in order for this to work, you need to have the proper instructions in the .htaccess file at the root of your site. ImpressCMS package already ships with an example of this file in htdocs/htaccess.txt :

ErrorDocument 400 /error.php?e=400
ErrorDocument 401 /error.php?e=401
ErrorDocument 402 /error.php?e=402
ErrorDocument 403 /error.php?e=403
ErrorDocument 404 /error.php?e=404
ErrorDocument 405 /error.php?e=405
ErrorDocument 406 /error.php?e=406
ErrorDocument 407 /error.php?e=407
ErrorDocument 408 /error.php?e=408
ErrorDocument 409 /error.php?e=409
ErrorDocument 410 /error.php?e=410
ErrorDocument 411 /error.php?e=411
ErrorDocument 412 /error.php?e=412
ErrorDocument 413 /error.php?e=413
ErrorDocument 414 /error.php?e=414
ErrorDocument 415 /error.php?e=415
ErrorDocument 416 /error.php?e=416
ErrorDocument 417 /error.php?e=417
ErrorDocument 500 /error.php?e=500
ErrorDocument 501 /error.php?e=501
ErrorDocument 502 /error.php?e=502
ErrorDocument 503 /error.php?e=503
ErrorDocument 504 /error.php?e=504
ErrorDocument 505 /error.php?e=505

Simply edit this file and replace all references to /error.php with the actual URL of your site. Then copy this file and rename it with this name, .htaccess and put it at the very root of your site.

If you install your site in a subdirectory, be sure to include the entire path relative to the DocumentRoot of your domain

For example, when your sites resides under, you would have

ErrorDocument 404 /icms/error.php?e=404

For example, if your site URL is, then your .htaccess file should be located in You can look a live example in this page

Last modified on 2011/7/14 by Anonymous
The comments are owned by the poster. We aren't responsible for their content.