Help - Search - Members - Calendar
Full Version: Custom 403 Errors REWARD FOR HELP!
The Planet Forums > Control Panels > Plesk
jaxon121
I've done quite a bit of searching on this forum but haven't come up with full answer for my problem.

All I want to do is direct 403 errors to a certain html document. My site uses CCBill to take credit card transactions and give users usernames and passwords to access the Member's area. I want 403's to send users to the CCBill sign-up page.

YES it's an adult site. FREE 1-MONTH MEMBERSHIP for anyone who can contribute significantly to the solving of this problem!! icon_wink.gif

I already know that I have to create and edit a .htaccess file. Currently, there are not one but 4 in my site, all created and installed (i'm assuming) by CCBill:
httpdocs/members/.htaccess
httpdocs/ccbill/.htaccess
httpdocs/ccbill/password/.htaccess
httpdocs/ccbill/secure/.htaccess
I've put in the following line in all of them:
ErrorDocument 403 http://www.domainname.com/ccbill/index.htm

But it doesn't work. I've read elsewhere on the forums that your .htaccess files have to be over 1k or else IE will use the default error pages.... is this true?

Per some advice I found on another thread, I've also edited my httpd.conf file...
AllowOverride AuthConfig Indexes Limit

But no go. HELP! Again, anyone who contributes significantly to the solving of this prob will get a free 1-month membership to my site... which has a ton of very hot models and 100% exclusive content.
Squire
The easiest way to do that is to create another .htaccess file directly under the httpdocs directory. That way it should affect any sub-directory which doesn't have a conflicting command to override the generic version.

It's late and I'm tired, but I believe your problem is that you're trying to use a full http url path in your htaccess file which is something of a no-no if memory serves. So if you cut it down to just:

ErrorDocument 403 /ccbill/index.htm

It should work fine.

btw, if you ever want to you can get really slick with your various error pages. I have one site which has 7 or 8 errors designated since it was getting spidered by the search engines before it was fully built. I did a little dynamic thing with those using just a couple of lines of php to create a link back to the page someone came from so that the SE wouldn't get stuck on a single page with no links back to the real site. If that would have happened they would have stopped spidering right then and there. The trick worked to keep the SE's happy and we eventually decided to leave the concept active since the site is continually being added to. icon_biggrin.gif

HTH

Squire
meballard
Also, FYI, it's the error page itself that has to be over 1K for IE to use it (if the error page itself is less than 1K, it will show it's default one). The size of the .htaccess file doesn't matter, as IE never even sees that.
jaxon121
hmmm... tried your suggestion, Squire, but no go!

meballard, by "error page" do you mean the HTML doc that is named in the ErrorDocument 403 line? that doc is indeed over 1k...

Any other ideas?
meballard
Yes, I was referencing the page that is referenced by the ErrorDocument line.

Have you tried specifying it from the main Apache configuration file instead?
jaxon121
nope, i havent.... where might I find that? (you might remember me as a total newbie, meballard... you've helped me on at least one other occasion!)
meballard
It's typically in /etc/httpd/conf/httpd.conf, but I'm not sure for Ensim, try searching for httpd.conf file(s).
hansm
The problem is internet explorer

open your error pages

add around 600 spaces in the start

and upload it again

then its working

its a problem in internet explorer, its needs a buffer of 300 and the errors logs are not a buffer of 300

check it with netscape its working without problems ie not

so just add 600 spaces in the start and then its solved
jmr
having the same problem did you manage to fix this if so can you tell how!
jaxon121
i eventually did solve the problem, though not entirely satisfactorily. the problem was that it's actually a 401 error, not a 403 error!! Even CCBill's tech support said that it's a 403 error ... go figure! Placing this line in my root directory .htaccess did the trick:

ErrorDocument 401 /ccbill/index.htm

the reason the problem was only partially solved was that I've got a strange bug going... hitting Cancel on the password dialog box takes you to the proper page now, but the password box immediately pops back up and none of the images, flash files, etc. on the page will work! Also, the status bar of the browser shows that it's still trying to load the page the person tried to access when he was redirected. very weird, and i haven't found a workaround. any ideas out there?
Paul
sounds like you're linking content from your protected directories from the error page.
jaxon121
wish that was the problem, Paul but i'm not linking anything from the protected directories. In fact, they're in the same directory as the ccbill page!
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.