3

I have following simple directive in .htaccess, I like to allow access by env, condition:

SetEnv ABC 1
<RequireAny>
  Require env ABC 
</RequireAny>

Seems to me very simple, but Access is always rejected:

AH01626: authorization result of Require env ABC: denied
[Thu Apr 10 14:33:19.091773 2014] [authz_core:debug] [pid 6583] mod_authz_core.c(802): [client 127.0.0.1:49697] AH01626: authorization result of <RequireAny>: denied

Any ideas, please ?

1 Answer 1

2

Use SetEnvIf:

The internal environment variables set by this directive are set after most early request processing directives are run, such as access control and URI-to-filename mapping. If the environment variable you're setting is meant as input into this early phase of processing such as the RewriteRule directive, you should instead set the environment variable with SetEnvIf.

http://httpd.apache.org/docs/2.2/mod/mod_env.html#setenv

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .