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

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

1 Answer 1

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.