How to create a 403 Forbidden message?

Discussion in 'Computers' started by David Baranyi, Oct 20, 2003.

  1. David Baranyi

    David Baranyi Stunt Coordinator

    Joined:
    Jul 17, 2003
    Messages:
    81
    Likes Received:
    0
    I noticed that sometimes I went to a web site, I see a message that I states that I have no permission to access. It is often known as the "403 Forbidden" message.

    I am interested in having this message on my web site. Since I consider myself a novice in web management, what steps should I do to have a working "403 Forbidden" message?
     
  2. Jason Harbaugh

    Jason Harbaugh Cinematographer

    Joined:
    Jul 30, 2001
    Messages:
    2,968
    Likes Received:
    0
    Does your host have Cpanel installed? If it does then you should have the option of creating your own error pages. Basically all they are are individual pages located in your root directory and named: 403.shtml, 404.shtml etc.

    There are different sets of code that you can insert to display the users IP, browser settings, the page they were looking for or trying to get to, etc.

    The outcome is this: http://www.lynxfx.com/xba/

    Not sure if you can just make your own pages and it will automatically find them. But it at least gives you an idea.
     
  3. nolesrule

    nolesrule Producer

    Joined:
    Aug 6, 2001
    Messages:
    3,084
    Likes Received:
    0
    Location:
    Clearwater, FL
    Real Name:
    Joe Kauffman
    Follow the instructions in this Comprehensive guide to .htaccess

    There's a list of things that you can do with .htaccess files on the bottom of the page, and Error Documents are at the top of the list. I believe .htaccess only works if your web server software is apache.
     
  4. Patrick Larkin

    Patrick Larkin Screenwriter

    Joined:
    May 8, 2001
    Messages:
    1,759
    Likes Received:
    0
    If you are using Apache, the 403 message is a default error response page. If a person attempts to access a directory without readable permissions or attempt to list a directory when not permitted, this error is generated

    The same applies to 404 Not Found, 500 Internal Server Error, etc. You can make custom pages by simply creating the pages, placing them somewhere on your webserver, and making the appropriate httpd.conf changes.

    If you are on a shared host, you may be able to do stuff using .htaccess (as stated above.)
     

Share This Page