Wednesday, February 19, 2020

.htaccess display error pages on http errors


In your htaccess file add the below lines and save to show error pages on Http errors (404, 403 etc)
ErrorDocument 403 /errors/404.html
ErrorDocument 404 /errors/404.html

Here, errors is the folder where you can keep your Http error pages .

If the requested resource doesn't exist, default to index.html
RewriteRule ^ /index.html

No comments:

Post a Comment

.htaccess display error pages on http errors

In your htaccess file add the below lines and save to show error pages on Http errors (404, 403 etc) ErrorDocument 403 /errors/404.html ...