SSI conditionals not accepting "||" or "&&"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




Good afternoon all,

I've been tinkering with setting up SSI's in some HTML of mine, and one thing I'm trying to do is have the server decide if it should post a signup link, or display a logged-in users name (using perl cgi includes). Using this kind of works:

<!--#if expr="%{HTTP_COOKIE} !~ /my_cookie/"-->
    Sign up here!
<!--#else-->
    <!--#include virtual="/my/script.cgi"-->
<!--#endif-->


The problem with this is that, after the user signs in, they still see the sign up text until they refresh their browser (assuming the session cookie isn't seen immediately after sign-in). So, I tweaked a little to try and compensate (by showing the sign up text if they're not already on the clients page, which requires login):

<!--#if expr="%{HTTP_COOKIE} !~ /my_cookie/" && expr="%{REQUEST_URI} !~ /clients/-->
    Sign up here!
<!--#else-->
    <!--#include virtual="/my/script.cgi"-->
<!--#endif-->


However, this always results in the sign up text showing. The Apache docs indicate that all expressions are supported here, but, unless my syntax is wrong, that doesn't look to be the case.

Am I missing something? Is my syntax wrong? Appreciate any help!


[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux