What does% (percent sign) do in Apache httpd.conf?

Ok, I see the following example from http://httpd.apache.org/docs/2.0/misc/rewriteguide.html . %{and }makes Apache interpret the line between the two delimiters as an Apache variable? Where is this documentation documented?

RewriteCond %{HTTP_HOST}   !^www\.example\.com [NC]
RewriteCond %{HTTP_HOST}   !^$
RewriteCond %{SERVER_PORT} !^80$
RewriteRule ^/?(.*)         http://www.example.com:%{SERVER_PORT}/$1 [L,R,NE]

Then http://httpd.apache.org/docs/2.2/configuring.html describes how to use shell variables like ${ENVVAR}. What is the difference?

+4
source share
1 answer

%{NAME_OF_VARIABLE} ( %) - mod_rewrite ( mod_rewrite). RewriteCond.

%{.. }, NAME_OF_VARIABLE .

mod_rewrite : %{ENV:variable}. ( ${ENVVAR} , , , ENVVAR . ENVAR , ${ENVVAR} "$ {ENVAR}", %{ENV:ENVAR} . , RewriteCond, , .. ${mapname:key|default} - , : ?)

+1

All Articles