Forum Discussion
iRule for pool usage instead of VIP(s)
Thanks Mayur,
I tried but now, I am having the response:
Hmmmm.... can´t reach this page
The connection was reset.
Try:
Checking the connection
etc
Then, tried adding this; but, I think, it will still need the VIP (virtual server configuration) to perform the redirection
when HTTP_REQUEST {
if { [HTTP::uri] starts_with "/service1" }{
pool pool-service1-80
HTTP::redirect http://[HTTP::uri]
} elseif { [HTTP::uri] starts_with "/service2" }{
pool pool-service2-80
HTTP::redirect http://[HTTP::uri]
} elseif { [HTTP::uri] starts_with "/service3" } {
pool pool-service3-80
HTTP::redirect http://[HTTP::uri]
}
}
then:
when HTTP_REQUEST {
if { [HTTP::uri] starts_with "/service1" }{
HTTP::redirect http://[HTTP::uri]
pool pool-service1-80
} elseif { [HTTP::uri] starts_with "/service2" }{
HTTP::redirect http://[HTTP::uri]
pool pool-service2-80
} elseif { [HTTP::uri] starts_with "/service3" } {
HTTP::redirect http://[HTTP::uri]
pool pool-service3-80
}
}
If I use something like this, seems to work as expected; but, I think using this option:
the virtual server configuration is used, instead of only the pool confguration
when HTTP_REQUEST {
switch -glob [HTTP::uri] {
"/service1*" {
pool /Common/pool-service1-80
HTTP::redirect http://[HTTP::uri]
return }
"/service2*" {
pool /Common/pool-service1-80
HTTP::redirect http://[HTTP::uri]
return }
"/service3*" {
pool /Common/pool-service1-80
HTTP::redirect http://[HTTP::uri]
return }
}
}
I´ll check your option about the policy...
Recent Discussions
Related Content
* 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