Mobile app version of vmapp.org
Login or Join
Speyer207

: How do you match a specific cookie value with Apache 2.4 statement? I am not able to figure out why the following doesn't match: <If %{HTTP_COOKIE} == 'XDEBUG_SESSION=leho'"> I'm setting

@Speyer207

Posted in: #Apache2 #Cookie #Htaccess

I am not able to figure out why the following doesn't match:

<If %{HTTP_COOKIE} == 'XDEBUG_SESSION=leho'">


I'm setting a php_value inside the matching If. I know that part works because this seems to match something

%{HTTP_COOKIE} =~ /leho/

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Speyer207

1 Comments

Sorted by latest first Latest Oldest Best

 

@Eichhorn148

HTTP_COOKIE is a semi-colon delimited list of all the cookies that are set. Your == test would only work if your cookie were the only one set. Instead, I would try this regular expression match in the <If> directive:

<If "%{HTTP_COOKIE} =~ /XDEBUG_SESSION=leho/">

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme