Actions
Bug #495
closedcan't use $HTTP["remoteip"] inside $HTTP["url"]
Status:
Fixed
Priority:
Normal
Category:
core
Target version:
-
ASK QUESTIONS IN Forums:
Description
The following works :
$HTTP["url"] =~ "^/some_path($|/)" { .... }
while the following does not:
$HTTP["url"] =~ "^/some_path($|/)" { $HTTP["remoteip"] != "10.10.0.0/24" { .... } }
in fact, having the remoteip part inside the url part prevents anything else in the url part from working... ex
$HTTP["url"] =~ "^/some_path($|/)" { dir-listing.activate = "disable" $HTTP["remoteip"] != "10.10.0.0/24" { ... } }
the dir-listing.activate will not be used at all. If you remove the remote ip part:
$HTTP["url"] =~ "^/some_path($|/)" { dir-listing.activate = "disable" }
it works as expected.
-- lorinel
Updated by darix almost 19 years ago
this is a general problem. stacked conditionals are not work at all atm.
Updated by moo over 18 years ago
it's a known problem that $HTTPurl cannot contains conditions other than another $HTTPurl. workarround:
$HTTP["remoteip"] != "10.10.0.0/24" { ... $HTTP["url"] =~ "^/some_path($|/)" { dir-listing.activate = "disable" } } else $HTTP["remoteip"] == "10.10.0.0/24" { ... $HTTP["url"] =~ "^/some_path($|/)" { } }
to avoid duplicating $HTTPurl =~ "^/some_path($|/)", u can put it into a file and include it.
Updated by jan over 17 years ago
- Status changed from New to Assigned
can you try if this is fixed in 1.4.17 ?
Updated by Anonymous over 17 years ago
The same issue as in #1164 - works in 1.4.17 with patch.
Updated by stbuehler almost 17 years ago
- Status changed from Assigned to Fixed
- Resolution set to fixed
Fixed in r2080, see #1164
Actions
Also available in: Atom