Does not display my created custom 404 error page.

Avatar
  • Answered
Hello Everyone.
Can someone help me about this problem.
I've created my 404 error page. In my site, I have 3 menus and one of them has also 3 sub-menus.
When I'm in my homepage(index.html) and try to type the wrong url, the 404 page works fine, but when I navigate to the sub-menus which is stored in sub-folders in my cpanel and try to type the wrong url, the images and css of my 404 page did not work, it only displays the text. I already put the ErrorDocument 404 /404.html in the .htaccess.


Here are my site structure in my cpanel.
-----the 3 html files below, the 404 page works fine--------
domain.com/index.html
domain.com/contact-us.html
domain.com/404.html

--The 6 pages below, the css and images of my 404 page did not display at all.---
domain.com/services/automotive.html
domain.com/services/residential.html
domain.com/services/commercial.html
domain.com/services/automotive/ignition.html
domain.com/services/residential/lock-change.html
domain.com/services/commercial/deadbolt.html

Can someone help me. Your help is very much appreciated. Really need for help.
Thank You very much.

Regards,
Jenelyn
Avatar
Arn
Hello Jenelyn, Sorry for the problem with your 404 page. The problem is likely linked to your .htaccess file if it's not working for your subdirectories. Check out our tutorial on this topic: Setting a 404 page via .htaccess. This should give you the necessary information to correct the issue. If you have any further questions or comments, please let us know. Regards, Arnel C.