Home » Php » php – Forward to a custom 404 page without changing uri htaccess

php – Forward to a custom 404 page without changing uri htaccess

Posted by: admin February 25, 2020 Leave a comment

Questions:

I’ve a htaccess file with this code:

ErrorDocument 404 http://localhost/site/not-found

Whenever a 404 occurs, it redirects to that particular folder.

All I want is to show that folder without changing the 404 url

I also tried editing:

ErrorDocument 404 /not-found

It doesn’t shows that folder content.

ErrorDocument 404 not-found

It only shows a blank page with not-found in it

How can I solve it?

How to&Answers: