Answer the question
In order to leave comments, you need to log in
Help with SetEnvIf?
I can’t find something in the Apache docs, how to make such a feature: set an environment variable if Remote_Addr and Server_Addr match .
The syntax is:
SetEnvIf <env_var> <regexp> <value1=1> <valuen=n>
SetEnvIf Remote_Addr Server_Addr IN_DEV=1
Answer the question
In order to leave comments, you need to log in
RewriteEngine on
RewriteCond %{SERVER_ADDR}_%{REMOTE_HOST} ^([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+)_\1$
RewriteRule .* - [E=IN_DEV:1]
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question