FreeHostia Forums
https://forum.freehostia.com/

Custom 404 page not working
https://forum.freehostia.com/viewtopic.php?f=4&t=64848
Page 1 of 1

Author:  bookmod [ Fri Apr 19, 2013 5:48 am ]
Post subject:  Custom 404 page not working

Hi all,

I have created a custom 404 page in my root directory and have also modified the .htaccess file to set the ErrorDocument to my specified page. When I try to purposely visit a non-existant page to trigger the 404 response, I am still sent to the default 404 document that says:
Quote:
Not Found

The requested URL /example was not found on this server.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

Apache/1.3.33 Server at domain.com Port 80


My file schema is as follows:
Code:
domain.com
    .htaccess
    404page.php
    index.php
    etc...


Also, the line I've entered in my .htaccess file:
ErrorDocument 404 /404page.php

Why could be causing my page to not be displayed?

Advice appreciated!

Author:  vandersur [ Fri Apr 19, 2013 3:49 pm ]
Post subject:  Re: Custom 404 page not working

Long time ago I couldn't set 404 page with .htaccess too. But I found such option in CP. Enter Hosted Domain menu. You can find Edit Domain button there and enter custom URL for 404 page.
It's working fine for users, but not for search engine crawlers. Server triggers 302 response instead of 404.

Author:  bookmod [ Fri Apr 19, 2013 6:08 pm ]
Post subject:  Re: Custom 404 page not working

That solved the problem perfectly! Pesky small button.

Thanks so much, Vandersur.

Page 1 of 1 All times are UTC
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/