Forum Discussion
muzammil_88686
Nimbostratus
Jul 01, 2012Redirecting to a pool
I m having a problem with an iRule.
I m trying to redirect the below "Source" URL to "Destination" URL(NOTE: Here * could be any sub URI)
Source:
=====
http://www.XYZ.com...
nitass
Employee
Jul 01, 2012e.g.
[root@ve10:Active] config b virtual bar list
virtual bar {
destination 172.28.19.79:http
ip protocol tcp
rules myrule
profiles {
http {}
tcp {}
}
}
[root@ve10:Active] config b rule myrule list
rule myrule {
when HTTP_REQUEST {
if {[string tolower [HTTP::uri]] starts_with "/123/"} {
HTTP::redirect "http://[string map {www hello} [HTTP::host]]:9090[HTTP::uri]"
}
}
}
[root@ve10:Active] config curl -I http://www.XYZ.com/123/something
HTTP/1.0 302 Found
Location: http://hello.XYZ.com:9090/123/something
Server: BigIP
Connection: Keep-Alive
Content-Length: 0
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