News:

Click here for Toll-Free Service for your business starting at $2.00 per month

Main Menu

Problem with error doc

Started by eusa, April 15, 2006, 04:51:43 PM

Previous topic - Next topic

eusa

I have my account set up to use /error403.php as the error doc for 403 errors. It works fine for files in my site's home directory, but if a subdirectory is accessed, it shows a standard apache 403 page with "Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request. I tried adjusting the permissions of error403.php all the way up to 777 but it had no effect.

What's wrong?

eusa

Also I have just noticed that I get the "Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request" error if I forbid access to the site's home directory and do not use a trailing slash in the request to the site.

e.g. http://www.freepgs.com/mysite/ shows the custom page, but http://www.freepgs.com/mysite shows the "Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request" error. I'm guessing this has something to do with HTTP 301....

(ps. freepgs.com/mysite isn't actually my URL)

admin

Both of these URLs are receiving the 403 error.  You are receiving this error because you have no index file and have told the system not to generate the automatic (file-list) index page.

Please upload an index file to your account to avoid this page or re-enable "Directory Indexes" via the Options panel.

If one URL shows other content, your browser has cached the page.  Please try holding shift and clicking the refresh button to view the current content.

Your Error 403 document is not working because you do not have a file named "error403.*" in your account.  You must create a file with this name for the error document to work correctly.

Thank you,
FreePgs.com Admin

eusa

Hi and thanks for the reply.

As I said, freepgs.com/mysite is NOT my URL. My FreePgs account is actually "mrt". You can check the problem for yourself using freepgs.com/mrt.

admin

You need to allow access to your error403.* file via .htaccess, otherwise it will not be able to access that file to display the error if you have blocked access.

(for example):
<Files error404.php>
Order deny,allow
Allow from all
</Files>

If your username is "mrt", then your url is http://www.freepgs.com/mrt/
Please post your actual information or use the Contact Form.


The problem is with your HTACCESS file.  Please correct the rewrite rules and you will not have a problem.  You are not rewriting to the URL with your username, it is trying to access the files in the wrong directory, hence the 404 errors.

You are also denying access to ALL users except ONE IP address.  If you wish the forbidden page to be displayed, you must allow access to that file via the sample above.  (You told the system to deny access to files within your directory.  Your error document is within your directory as well and is also denied.  Please consult Apache the documentation for more information.)

Thank you,
FreePgs.com Admin

eusa