Hi all,
I am trying to limit access to a directory, allowing only request with certain env variable set to get resources.
This configuration will not give me access to the resource.
--------------DOESNT WORK----------
SetEnv let_me_in 1
<Directory "/web/htdocs/zips">
Order Deny,Allow
Deny from all
Allow from env=let_me_in
</Directory>
-----------------------------------
However, if I change the configuration using SetEnvIf, it will allow me access to the resource (zip file within that directory).
------------WORKS------------------
SetEnvIf User-Agent ^Mozilla/4\.0 let_me_in
<Directory "/web/htdocs/zips">
Order Deny,Allow
Deny from all
Allow from env=let_me_in
</Directory>
-----------------------------------
Does this two commands (SetEnv/SetEnvIf) sets the same environment variable? If so, why does the first config (with SetEnv) doesn't work?
Thanks,
I am trying to limit access to a directory, allowing only request with certain env variable set to get resources.
This configuration will not give me access to the resource.
--------------DOESNT WORK----------
SetEnv let_me_in 1
<Directory "/web/htdocs/zips">
Order Deny,Allow
Deny from all
Allow from env=let_me_in
</Directory>
-----------------------------------
However, if I change the configuration using SetEnvIf, it will allow me access to the resource (zip file within that directory).
------------WORKS------------------
SetEnvIf User-Agent ^Mozilla/4\.0 let_me_in
<Directory "/web/htdocs/zips">
Order Deny,Allow
Deny from all
Allow from env=let_me_in
</Directory>
-----------------------------------
Does this two commands (SetEnv/SetEnvIf) sets the same environment variable? If so, why does the first config (with SetEnv) doesn't work?
Thanks,