6

Do the apache docs have a full list of these variables? Or is there some way that I can find out what they are in apache? The variables are things like %{Referer} and %{User-agent}.

  • Variables allowed in RewriteCond are not the same thing as environment variables. Which one are you interested in? – Shane Madden Jun 28 '12 at 1:06
6

Dave from addedbytes wrote this great cheatsheet: https://www.cheatography.com/davechild/cheat-sheets/mod-rewrite/

3

Apache HTTP Server v2.4 documentation provides expression parser variables here that includes the %{HTTP_REFERER} and %{HTTP_USER_AGENT} aspects you were seeking.

Also, keep in mind, the docs mention this and other details:

Note that the value of a variable may depend on the phase of the request processing in which it is evaluated.

A bit different but somewhat related is v2.4 documentation on environment variables that affect the Apache HTTP Server.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy