0

Is there a way to have the request parameters "forward on" to the custom error file in apache much like [QSA] does on rewrite rules?

if i send in www.foo.com/doesnotexist?bar=true

and i have this in vhost:

ErrorDocument 404 /customerrorpage

then it would call customerrorpage with:

customerrorpage?bar=true
1
  • I can confirm that Richard's suggestion works great. Please accept his answer :) Commented Sep 23, 2014 at 12:41

1 Answer 1

2

I know this is really old question, but it hasn't been answered and so in case someone else is searching the site for the answer I'll share what I know.

The Apache 2.2 ErrorDocument page says that when you have a Custom Error page which is a local page then a number of environment vars will be set which can be read from your customer error handler. One of the vars is REDIRECT_QUERY_STRING which will contain the query string that the original page had. So in your example the REDIRECT_QUERY_STRING would contain 'bar=true'.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.