You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by "Salim Abdul -X (salimabd - HCL TECHNOLOGIES LIMITED at Cisco)" <sa...@cisco.com.INVALID> on 2019/11/14 18:07:51 UTC

[users@httpd] Apache 2.4.41 checking env variable value

Hi Experts,

I want to check the value of an environment variable which is already set.

<Directory />
    AllowOverride None
    Require env XYZ == 'SUCCESS' || expr "%{REQUEST_URI} == '/xyz/register/register.rq'"
</Directory>

Here I want to check the variable is 'SUCCESS'. What is the correct syntax to check the value of the env variable.

Thanks in advance,

Regards,
Salim

Re: [users@httpd] Apache 2.4.41 checking env variable value

Posted by Yann Ylavic <yl...@gmail.com>.
On Thu, Nov 14, 2019 at 7:08 PM Salim Abdul -X (salimabd - HCL
TECHNOLOGIES LIMITED at Cisco) <sa...@cisco.com.invalid> wrote:
>
> Hi Experts,
>
>
>
> I want to check the value of an environment variable which is already set.
>
>
>
> <Directory />
>
>     AllowOverride None
>
>     Require env XYZ == ‘SUCCESS’ || expr “%{REQUEST_URI} == ‘/xyz/register/register.rq’"

Something like this should work:
  Require expr “env('XYZ') == 'SUCCESS' || %{REQUEST_URI} ==
'/xyz/register/register.rq'"

>
> </Directory>

Regards,
Yann.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org