Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

404 pages under a folder

Discussion in 'General Discussion' started by htsnet, Dec 12, 2009.

  1. htsnet

    htsnet Member

    Joined:
    Dec 31, 2003
    Messages:
    16
    Likes Received:
    0
    Trophy Points:
    151
    Okay, so I setup a 404 page for my subdomain. It works great. However, I only want it to work for the root of the subdomain (http://sub.mydomain.com). I want to specify different 404 pages for the folders underneath the subdomain (http://sub.mydomain.com/myfolder).

    Any thoughts on how I can get this to work?

    BTW, placing a 404.shtml in the folder won't cut it.

    TIA
     
  2. thewebhosting

    thewebhosting Well-Known Member

    Joined:
    May 9, 2008
    Messages:
    1,201
    Likes Received:
    1
    Trophy Points:
    68
    I think you can not do it directly from cPanel. You will manually have to edit .htaccess file of the sub folder and enter below:

    ErrorDocument 404 /filename
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice