[HELP] 404 Page

Status
Not open for further replies.

Gajeel

Well-Known Member
Oct 4, 2011
2,411
413
Hello DevBest!

I would like to ask if it is possible to make a 404 page even when my pages are on HTML or do I need it to be on PHP? And how would I redirect someone to that specified 404 page when the file/page they are trying to reach is missing/lost.

Regards,
Vineen
 

Xenous

o shi
Nov 15, 2011
383
101
Make a htaccess and put this in it.
Code:
ErrorDocument 404 /error.html
then make a file called error.html in the main part of htdocs/wwwroot
 

Gajeel

Well-Known Member
Oct 4, 2011
2,411
413
Make a htaccess and put this in it.
Code:
ErrorDocument 404 /error.html
then make a file called error.html in the main part of htdocs/wwwroot
What shall be the filename? Windows keeps asking me what shall be the file name.
 

Gajeel

Well-Known Member
Oct 4, 2011
2,411
413
.htaccess
Here is my .htaccess
Code:
# Do not remove this line, otherwise mod_rewrite rules will stop working
RewriteBase /
 
ErrorDocument 404 /error.html

And my 404 page (error.html) (temporary)
HTML:
Cookie Monster ate my page! :O

Yet it still redirects to my webhost's 404 page (I use free webhosting).
 
Status
Not open for further replies.

Users who are viewing this thread

Top