我一直在尝试过去3个小时试图匹配一个if语句来在httpd.conf中定义一个variables,但没有成功:
<If "%{HTTP_HOST} =~ /[az]+/i"> Define test_value "A" </If> <Else> Define test_value "B" </Else>
我努力了:
<If "%{HTTP_HOST} !~ /[az]+/i"> <If "%{HTTP_HOST} == 'mysite.com'"> <If "%{HTTP_HOST} != 'mysite.com'"> <If "%{HTTP_HOST} == ''"> <If "%{HTTP_HOST} != ''">
全部匹配else情况。 什么可能是错的?