Matt Bettiol
Matt Bettiol

Reputation: 31

Custom 404 error page with same URL

How would one go about enabling a custom 404 page on a 404 request, while retaining the same URL in the address bar instead of it looking something along the lines of http://yourwebsite.com/error.html.

Upvotes: 3

Views: 719

Answers (1)

John Conde
John Conde

Reputation: 219924

Just add the following line to your htaccess file in your root web directory:

ErrorDocument 404 /404page.html

Then make 404page.html contain whatever text you wish to display to the user.

Upvotes: 3

Related Questions