Forum Discussion
Pradeep_Kandala
Nimbostratus
Dec 04, 2014Can we have two irule for the same virtual server, But running only one based on url ?
Can we have two irule for the same virtual server, But running only one based on url ?
I have single url's and 2 irules(can not merge into one due to complexity), and I need to have the i Rules ...
nitass
Employee
Dec 10, 2014is it something like this?
e.g.
configuration
root@(ve11a)(cfg-sync In Sync)(Active)(/Common)(tmos) list ltm virtual norf
ltm virtual norf {
destination 172.28.24.10:80
ip-protocol tcp
mask 255.255.255.255
pool foo
profiles {
http { }
tcp { }
}
rules {
rule1
rule2
}
source 0.0.0.0/0
source-address-translation {
type automap
}
vs-index 7
}
root@(ve11a)(cfg-sync In Sync)(Active)(/Common)(tmos) list ltm rule rule1
ltm rule rule1 {
when HTTP_REQUEST priority 100 {
if { [HTTP::uri] starts_with "/something" } {
log local0. "uri=[HTTP::uri] executing rule1"
event HTTP_REQUEST disable
}
}
}
root@(ve11a)(cfg-sync In Sync)(Active)(/Common)(tmos) list ltm rule rule2
ltm rule rule2 {
when HTTP_REQUEST priority 200 {
log local0. "uri=[HTTP::uri] executing rule2"
}
}
/var/log/ltm
[root@ve11a:Active:In Sync] config tail -f /var/log/ltm
Dec 11 16:42:29 ve11a info tmm[14890]: Rule /Common/rule1 : uri=/something/abc/123 executing rule1
Dec 11 16:42:49 ve11a info tmm1[14890]: Rule /Common/rule2 : uri=/anythingelse executing rule2
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