The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

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:
    1
    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:
    38
    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
     
Loading...

Share This Page