Create a custom 404 error page in php in localhost

I want to create a personalized one 404 error pagein php, I want it to work in localhost, since you know that localhost does not have a .htaccess file!

+5
source share
2 answers

You can create a .htaccess file in your local host. Just make sure it is in the root directory of your web server (I believe in WAMP, this is the www folder). In XAMPP, this is the htdocs folder

+2
source

You can create a .htaccess file in your local host. Just make sure it is in the root directory of your web server (I believe in WAMP, this is the www folder). In XAMPP, this is the htdocs folder

Then in your .htaccess file you just need something line by line:

ErrorDocument 404 /path/to/error/404/page
+4
source

All Articles