Forum Discussion
Gregt_33960
Nimbostratus
May 13, 2008Masking or Redirect?
Hello,
I am hoping some one can help me. I multiple application environments running (test, train, dev, etc..) on a group of web servers. To get to each environment, the client ...
Nicolas_Menant
Employee
May 15, 2008Hi,
You should use the iRule editor since the iRule editor is more flexible than through the GUI i.e a space forgotten may create syntax issue.
For example in the GUI you should add a space between } and { for a if statement
Try this one:
when HTTP_REQUEST {
log local0. "Current URI: [HTTP::uri]"
if {[HTTP::uri] starts_with "/test" } {
if {[HTTP::uri] ends_with "/test" } {
HTTP::uri "/test/jsp/common/pgLogin.jsp"
}
pool state_test_pool
} elseif {[HTTP::uri] starts_with "/dev"} {
if {[HTTP::uri] ends_with "/dev" } {
HTTP::uri "/dev/jsp/common/pgLogin.jsp"
}
pool state_dev_pool
} elseif {[HTTP::uri] starts_with "/train"} {
if {[HTTP::uri] ends_with "/train" } {
HTTP::uri "/train/jsp/common/pgLogin.jsp"
}
pool state_train_pool
}
}
If it doesn't work i would strongly advise to use the iRule editor, if not possible then here a way to find your syntax error message:
Remove all your iRule in a notepad for example and insert it back piece by piece. This way as soon as you have the syntax error message you'll find the culprit area. Works fine usually, not the most convenient way but the sytanx error message can tell you the wrong line sometimes!
HTH
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects