How can I add 404 custom page in apache with htaccess?

 How can I add 404 custom page in apache with htaccess?

Before add 404 custom page with htaccess,
First, you must activate rewrite module.



First, you must activate rewrite module.
Ctrl+v this code in terminal.
sudo a2enmod rewrite

If you finished the rewrite activating, You can use htaccess in apache.

First, make a error file or 404 file.
And add this code in htaccess
ErrorDocument 404 /error.html
This code means if user gets 404, user goes to /error.html.

ex) user get 404,

view this custom error page

Instead of



Thanks for watching and write the commet to rewrite request or question


Post a Comment

0 Comments

recent post