I am looking for a way to get the original URL during RewriteRule and append it to the query string as an additional parameter or add it as a header to the request.
How can i do that?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Appending stuff to the query string is straightforward (just write stuff after a question mark, and don’t forget to use the QSA flag to append the original query string); and, well, you can just capture the whole URI and append that:
Alternatively, you may try one of the several server variables providing info about the request:
Note that the content of server variables may vary wildly between systems.
You can also modifiy headers, but it’s not as straightforward. Check out this question for a way to do it.