Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 7 of 7
  1. #1
    Member
    Join Date
    Aug 2006
    Posts
    193

    Default My custom 403 pages don't work, because the connection is refused ;)

    Hi there guys,

    I'm getting bagged by referral spam, and I'm taking escalating measures via .htaccess to protect the site, but as always happens, a couple people get caught in the cross fire. No problem, right? Just create a custom 403 file and help them get back to the site.

    Only problem is that the custom 403 page will not show. It's just the default(can't find it) message. I've also created a 404 page which views just fine, so this leads me to believe that the 403 file isn't getting served because of the refused connection.

    Can someone help me get a 403 file working?

    thanks,
    json

  2. #2
    Member
    Join Date
    Sep 2003
    Posts
    141

    Default

    Hello.

    Did you add the line like:

    ErrorDocument 403 /403.html

    in .htaccess of your account ? If so, does 403.html exist in root of public_html ?

  3. #3
    Member
    Join Date
    Aug 2006
    Posts
    193

    Default

    Hi there and thanks for the reply,

    I did add that in the .htaccess and the 403 error page is in the root. If I purposefully block myself, it shows the default error, however if I remove the .htaccess file and refresh the page, it properly shows my custom 403 page. It's blocking me from getting the 403 page.

    thanks,
    json

  4. #4
    Member
    Join Date
    Feb 2006
    Posts
    111

    Default

    You need to add a rule to the .htaccess file to allow you to access only that file, otherwise it will just block you from the file.

    If you understand.

  5. #5
    Member
    Join Date
    Aug 2006
    Posts
    193

    Default

    thanks very much for your reply.

    I can find tons of data on how to block a file, but I can't seem to find anything on how to allow a file. Can anyone paste the proper code to use in .htaccess?

    thanks,
    json

  6. #6
    Member
    Join Date
    Aug 2006
    Posts
    193

    Default

    Got it:

    Code:
    <Files 403.shtml>
    order deny,allow
    allow from all
    </Files>
    thanks,
    json

  7. #7
    Member
    Join Date
    Feb 2006
    Posts
    111

    Default

    Its sometimes just a small hint can make you think

Similar Threads & Tags
Similar threads

  1. Connection refused (61)
    By bsdfun in forum cPanel and WHM Discussions
    Replies: 3
    Last Post: 09-07-2009, 08:54 AM
  2. Spamassassin - Custom rules don't work...
    By Shazan in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 01-02-2006, 03:17 PM
  3. rndc: connection failed: connection refused
    By neilsk in forum cPanel and WHM Discussions
    Replies: 5
    Last Post: 08-22-2004, 08:04 AM
  4. rndc: connection failed: connection refused
    By neilsk in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 08-16-2004, 08:58 AM
  5. Adding Custom Error Pages for non-existant pages
    By YukFoo in forum cPanel and WHM Discussions
    Replies: 3
    Last Post: 09-16-2002, 03:07 AM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube