- 論壇徽章:
- 0
|
Conditional Configuration
Most options can be configured conditionally by using the following syntax (including nesting).
<field> <operator> <value> {
...
<field> <operator> <value> {
... nesting: match only when parent match
}
}
else <field> <operator> <value> {
... the "else if" block
}
文檔里有這樣一段。但是在具體操作的時候有個疑問,不知道大家怎么解決的?
你寫程序的時候一般都會這樣
if (a = 1)
echo ok
else
echo bad
其實在else里面隱藏著一句 a 不等于 1
但用lighttpd的時候語法規(guī)定else后面也一定要加匹配條件。。。很郁悶
譬如如下場景就很郁悶了
當url匹配a.php把請求跳轉到server c:80
當url匹配b.php把請求跳轉到server d:80
其他url都跳到error.html |
|