Apache Requer que o env seja ignorado

1

Tenho a seguinte diretiva simples no .htaccess, gosto de permitir o acesso por env, condição:

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

Parece-me muito simples, mas o Access é sempre rejeitado:

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

Alguma idéia, por favor?

    
por Ivan 10.04.2014 / 14:46

1 resposta

1

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.

link

    
por 10.04.2014 / 14:57