Forum Moderators: phranque
Is this a good idea or will it break things?
I realise I need to make the 404.php page and upload it to the same directory as 404.html. I can also see some other files in this directory:
.htaccess
404.cgi
404.conf
http-error.cgi
Am I correct in thinking I can just go through these files with a text editor and replace every instance of 404.html with 404.php? Can anyone forsee any problems with doing this? Like I said, I don't want to break the internet ;)
Thanks,
H.
Edit your .htaccess file so it has this line
ErrorDocument 404 /full/path/404.php
That will specify a document called "404.php" to be the error document for that directory. You should use the full path so that if the 404 document is called for in a subdirectory, it can be found.
I have found the existing .htaccess file in my root directory which presently has this in it...
ErrorDocument 404 /404/http-error.cgi
ErrorDocument 500 /404/http-error.cgi
so I guess all the perl stuff in the 404 directory is to do with sending me the error emails. So I am thinking maybe I have to go into these files and change them, as I want to keep on getting the emails?
Helen.