は、あなたがそのような何かを試してみました(正規表現の初心者として)私のナットを駆動する、同様の条件で一致しなければならないことを要求されます:その方法
$HTTP["url"] =~ "^/subdirectory/_different_end_points_.json" {
proxy.server = (
"/" => (("host" => "127.0.0.1", "port" => 9001))
)
}
else $HTTP["url"] =~ "^/_different_end_points_.json" {
proxy.server = (
"/" => (("host" => "127.0.0.1", "port" => 9002))
)
}
がで始まり、/subdirectory/_different_end_points_.jso
または(elseで)/_different_end_points_.json
で始まる各URLと一致します。
しかし、本当にあなたのURLは本当に正規表現で始まるようにしてください!つまり、h * tp://sample.com/subdirectory/_different_end_points_.jsonとh * tp://sample.com/_different_end_points_.json
出典
2012-03-26 08:00:44
j0k