Regex in Apache 'if' directive … what's wrong here?
问题 (A possible bug in Apache is now suspected ... see below.) Here's the statements: (Apache 2.4) <IfDefine !SERVER_TYPE> Define SERVER_TYPE prod </IfDefine> <If "${SERVER_TYPE} !~ /prod|demo|test/"> <===error here=== Error "Define 'SERVER_TYPE' is hosed'" </If> Apache complains about the IF: Cannot parse condition clause: syntax error, unexpected T_OP_NRE, expecting '(' I can guess that T_OP_NRE refers to "negated regular-expression" i.e. "!~" but I can't for the life of me figure out what's