.htaccess file: ErrorDocument 500 /img-sys/500.htm RewriteEngine On RewriteRule . /abc [L] in browser go to yourdomain.com/whatever apache will still display standard error page in this case - it seems that ErrorDocument does not affect error message when rewrite recursion limit is reached - but that makes ErrorDocument buggy because its whole purpose is to change error message.