#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2000
    Posts
    1
    Rep Power
    0
    I am having a problem with defining custom error pages in Apache.
    I added the following line to my httpd.conf:

    ErrorDocument 404 /main/error404.jsp

    but nothing happens. The thing is, that if I give the full URL, like:

    ErrorDocument 404 http://www.mypage.com/main/error404.jsp

    then it works.
    I thought that if a local URL, like the first one, is used - then it should be relative to the DocumentRoot (which is set in httpd.conf). Well, it is but it simply does not work!

    What am I doing wrong???

    Thanks in advance.
    Gauti.
    gauti@salt.is
  2. #2
  3. Full Access
    Devshed Regular (2000 - 2499 posts)

    Join Date
    Jun 2000
    Location
    London, UK
    Posts
    2,019
    Rep Power
    17
    I think the best way to do custom error pages is to define them in a .htaccess file. I did that and it worked fine.

IMN logo majestic logo threadwatch logo seochat tools logo