I assume that you are using Apache and not IIS;
Make sure you turn on the modem overwrite feature . You can do this by specifying the line below in the httpd.conf file (usually in the /conf/ directory. This could be different if you are using shared hosting and removing the half-density from the beginning of the line)
;LoadModule rewrite_module modules/mod_rewrite.so
Find the appropriate directory tag for your www root and change AllowOverride None to AllowOverride All
Create a .htaccess file in the root directory (if it does not exist)
You will need to insert something similar to this ;
ErrorDocument 500 /errordocs/500.html
ErrorDocument 404 /errordocs/404.html
ErrorDocument 401 /errordocs/401.html
ErrorDocument 403 /errordocs/403.html
Instead of ErrorDocument 404 /errordocs/404.html you can also make ErrorDocument 404 http://www.yourdomain.com/errordocs/404.html or even just display the simple ErrorDocument 404 "Sorry can't allow you access today" message ErrorDocument 404 "Sorry can't allow you access today"
If you are having problems, the Apache Handbook (ErrorDocument directive) should help you further.
In your case, make sure that AllowOverride All enabled, editing the .htaccess file in the root directory and make sure that you can click the URL of the error page if the URL you provided does not indicate that Apache will return 404 by default .
user2069217
source share