Forum Discussion
Ian_Amos_37833
Nimbostratus
Apr 27, 2007Using [HTTP::hostname] & [HTTP::uri]..
Afternoon all,
there is probably a really easy solution for this, but i've not had any F5 training, and have run out of ideas..
To try and explain the situation;
there is...
hoolio
Cirrostratus
Apr 30, 2007The format you have posted should work. I tested the following and both the if and elseif actions worked:
when HTTP_REQUEST {
if {[HTTP::host] starts_with "if" && [HTTP::uri] starts_with "/if"}{
HTTP::respond 200 content "matched if"
} elseif { [HTTP::host] starts_with "elseif" && [HTTP::uri] starts_with "/elseif"}{
HTTP::respond 200 content "matched elseif"
}
}Can you check the /var/log/ltm log file for errors when you test your rule?
Also, you should be able to wrap conditions in ()'s. You would get an error if you used []'s to wrap the conditions though.
Aaron
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