Custom 404 Page Being Ignored

For anyone else who runs into this frustrating situation.

Webpage

https://skepticwriter.com

Error Message

“We couldn’t find that page.” from iFastNet

Other Information

I set up a custom 404 page following what instructions were available. I put it in htdocs/errors and named it 404.php.
I used the Error Pages function in the control panel to route 404 errors to my custom page. I then tested it by entering a non-existent page.

After many hours of frustration, I found that:

  • Using the Error Page function in the Control Panel adds “http://” to the front of anything I type. To get around this, I edited the .htaccess file in htdocs.
  • Pointing to any pages in /errors always produces a different 404 page that appears to be from iFastNet. To get around this, I used a different directory, and now my custom 404 page is displayed.
1 Like

I believe the reason this does not work is because you cannot have a directory or file named “errors” or “error”. If you try renaming the folder, does it work?

1 Like

You cannot name a folder “errors” but “error” is allowed. I use the latter on my site.

4 Likes

Following InifinityFree’s .htaccess file in my root as an example, it contains:

ErrorDocument 403 https ://infinityfree.net/errors/403/
ErrorDocument 404 https ://infinityfree.net/errors/404/
ErrorDocument 500 https ://infinityfree.net/errors/500/

I added a space after https otherwise it reverts the link to the name of the page.

I hadn’t tried it “error,” but I did rename it and it worked.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.