custom 404 file doesn't load.

Status
Not open for further replies.

sifaka

Member
Messages
46
Reaction score
0
Points
6
I made a custom 404 file named "error404.html" called by "ErrorDocument 404 error404.html", which I have uploaded and named .htaccess. I have intentionally left them in the root directory for testing simplicity. I did not put error404.html in a folder named errordocs. I will later if I can make it work.

The .htaccess document returns the literal string "error404.html", the filename. It does not load in my browser as an html page. Any ideas?
 

descalzo

Grim Squeaker
Community Support
Messages
9,373
Reaction score
326
Points
83
Code:
ErrorDocument /error404.html

add a leading /
 

sifaka

Member
Messages
46
Reaction score
0
Points
6
Then the server gives us:

Not Found

The requested URL /final RI/pages/biographies.html was not found on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
 

descalzo

Grim Squeaker
Community Support
Messages
9,373
Reaction score
326
Points
83
Code:
ErrorDocument  404  /error404.html

Sorry, I forgot the '404' .
 

sifaka

Member
Messages
46
Reaction score
0
Points
6
Yes descalzo, I put in:

ErrorDocument 404 /error404.html

It is in the same directory, so it doesn't use the backslash. This should work, but it only returns the letters of the filename:

ErrorDocument 404 error404.html

returns:

error404.html

and that's all

Thanks again.
 
Status
Not open for further replies.
Top