Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

create a personalized 404 error page in php in localhost

I want to create a personalized 404 error page in php , I want to it works in localhost, as you know the localhost does not have .htaccess file !

like image 794
Javad Yousefi Avatar asked Sep 22 '12 22:09

Javad Yousefi


1 Answers

You can create a .htaccess file in your localhost. Simply make sure it is in the root directory of your web server (I believe in WAMP, it's the www folder). In XAMPP, it's the htdocs folder

Then in your .htaccess file, you simply need something along the lines of:

ErrorDocument 404 /path/to/error/404/page
like image 94
David Avatar answered Sep 21 '22 07:09

David