Welcome to the JaguarPC Community
JaguarPC
Sales: (888) 338-5261
Support: (888)-551-3050
Results 1 to 6 of 6

This is a discussion on Custom Error Pages in the Shared & Semi-Dedicated forum
I understand you can create an error page for your site. Like 404.shtml for when a user gets a 404 error. But, what about 403.x? ...

  1. #1
    BNX
    BNX is offline
    JPC Member
    Join Date
    Jul 2004
    Location
    Eugene, Oregon
    Posts
    49

    Custom Error Pages

    I understand you can create an error page for your site. Like 404.shtml for when a user gets a 404 error.
    But, what about 403.x?

    What do I do to set up a 403.x page? More specifically, 403.6 (I want to set up a redirect or custom page for when someone tries to go to my site whos IP is denied. How would I do this?)
    -Thanks

  2. #2
    Community Leader jason's Avatar
    Join Date
    Sep 2001
    Location
    Rochester, NY
    Posts
    6,003
    Edit (or create) your site's .htaccess file to include the following line:

    ErrorDocument 403.6 /path/to/4063-6.html

    I'm not sure if it will work with a 403.6 or not. You might have to use a generic page for all 403 errors (use ErrorDocument 403 /path...). As for the file, it can be any type of files (php, html, CGI, or even an image, Flash movie, whatever...) and should be somewhere inside of your public_html directory. For example, I have php scripts for my error documents, which I keep in public_html/errors. The path that you specify should be relative to your website's home, so if you were going to set it up the same way I did, you'd use /errors/403.html or something like that.

    --Jason
    Jason Pitoniak
    Interbrite Communications
    www.interbrite.com www.kodiakskorner.com

  3. #3
    Yeah, I know a LOT! Vin DSL's Avatar
    Join Date
    Mar 2003
    Location
    Arizona Uplands
    Posts
    10,775
    If you'll pardon the pun, no problem: http://www.lenon.com/modules.php?nam...un c=error403
    DISCLAIMER Any resemblance between the views expressed above and those of the owners and operators of this system is purely coincidental. Any resemblance between these views and my own are non-deterministic. The existence of Vin DSL is questionable. The existence of views in the absence of anyone to hold them is problematic. The existence of the reader is left as an exercise in the second-order coefficient.

    No Guts, No Story! VinDSL © 2010

  4. #4
    BNX
    BNX is offline
    JPC Member
    Join Date
    Jul 2004
    Location
    Eugene, Oregon
    Posts
    49
    awesome thanks guys...

    By the way... Awesome site Vin DSL, I wish i could do that kind of stuff


    also, im assuming by " /path/to/4063-6.html" you mean "ErrorDocument 403.6 /path/to/403-6.html" but ill do both
    Last edited by BNX; 03-21-2005 at 11:59 PM.

  5. #5
    Community Leader jason's Avatar
    Join Date
    Sep 2001
    Location
    Rochester, NY
    Posts
    6,003
    Quote Originally Posted by BNX
    also, im assuming by " /path/to/4063-6.html" you mean "ErrorDocument 403.6 /path/to/403-6.html" but ill do both
    What you put after the error code (in this case 403.6) is just the URI of a file that you want to call when an error of that type occurs. you can name it anything you want (and in this case, there was a typo in what I posted). I usually use the error code number as the file name because it makes it easy to know what's what, but you don't have to. You could use

    ErrorDocument 404 /errors/monkey.html
    ErrorDocument 403 /errors/elephant.html
    ErrorDocument 500 /errors/aligator.html

    and Apache wouldn't care.

    --Jason
    Jason Pitoniak
    Interbrite Communications
    www.interbrite.com www.kodiakskorner.com

  6. #6
    BNX
    BNX is offline
    JPC Member
    Join Date
    Jul 2004
    Location
    Eugene, Oregon
    Posts
    49
    fair enough ^_^

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •