Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to access GET parameters from mod_rewrite.

E.g., given this URL:

The following rule does not catch this URL:

RewriteCond %{REQUEST_URI} bar [NC]

While this one does:

RewriteCond %{THE_REQUEST} bar [NC]

Doesn't REQUEST_URI include GET parameters? Is THE_REQUEST the way to go?

share|improve this question
up vote 1 down vote accepted

Yes, THE_REQUEST is the way to go as it will contain the entire http request with the following stipulation:

The full HTTP request line sent by the browser to the server (e.g., "GET /index.html HTTP/1.1"). This does not include any additional headers sent by the browser.
share|improve this answer
I looked at the documentation, but I interpreted it to mean REQUEST_URI would contain the GET parameters. Oh well. – ripper234 Nov 6 '11 at 15:56

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.