Jump to content

ErrorDocument


The Little Guy

Recommended Posts

I am making error documents, they are stored in a folder called "error"

 

so to access this error file from the address bar would look like this:

 

http://site.com/error/500.html

 

I have all these methods, and none work:

ErrorDocument 500 /error/500.html

ErrorDocument 500 error/500.html

ErrorDocument 500 http://site.com/error/500.html

 

The first way just displays my server's default 500 page.

The second way displays "error/500.html".

The third way just redirects the browser to the error page.

 

How can I get it to display the error page?

Link to comment
Share on other sites

I guess I am getting this too:

 

Wed Oct 08 01:59:11 2008] [error] [client 66.249.73.90] mod_rewrite:

maximum number of internal redirects reached. Assuming configuration

error. Use 'RewriteOptions MaxRedirects' to increase the limit if

neccessary.

[Wed Oct 08 01:59:11 2008] [error] [client 66.249.73.90] Request exceeded

the limit of 10 internal redirects due to probable configuration error.

Use 'LimitInternalRecursion' to increase the limit if necessary. Use

'LogLevel debug' to get a backtrace.

 

From this:

RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.+)$ /$1.php [L,QSA]

 

If I comment that out, then it takes me to a 404 page (what I wanted to get instead of the 500 error)

Link to comment
Share on other sites

RewriteRule ^(.+)$ /$1.php [L,QSA]

 

 

That will match anything.

 

That will be ran until it doesn't match any more, and the times after the first time it is run, the rewrite conds are ignored.

 

Is there an exact thing you're trying to match?  If so, you could just rewrite the rewrite.  Otherwise, you'll have to get creative/complex with the rewrite so you won't get a loop.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.