Question

I am trying to create a custom 404 error page. The instructions that I found say to create a .htaccess empty text document when I do that Windows tells me to put a file name on it. Can someone tell what I need to do or point me to a tutorial for making custom 404 error pages?

Was it helpful?

Solution

It seems like you're just trying to make the page itself (according to the commentary on the question). To create the page just make a file of any name .html or whatever format you wish to use (.php for php for example) and write it up using your language of choice. Once you create the 404 page you need to specify it's location, assuming you're uploading this to a site of yours. This should be editable in a control panel like CPanel for example. If not, you'll need to edit your apache config to specify it's location or make and upload an .htaccess file to specify it's location.

OTHER TIPS

The problem is that Windows Explorer doesn't let you create file with name .htaccess. Instead of creating the file with Windows Explorer, open a Notepad and save the file with name .htaccess. Don't forget to change "Save as type" to "All Files (*.*)", otherwise it will add .txt extension to it.

Assuming you are using Apache and .htaccess is not activated you use

# this is in .htaccess in the root directory of the webspace
ErrorDocument 404 /url/to/error/page.html
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top