Forum Discussion
f5jr_28664
Nimbostratus
May 14, 2011IRule to redirect
Hey Folks,
I would like to redirect the URL https://www.yyy.com/product/catalog/index.cgi?catalog=3455 to https://zzz.ccc.com/product/catalog...talog=3455 with iRule for production migration...
Colin_Walker_12
May 17, 2011Historic F5 Account
If you're on v9 or later then you'd need a Client SSL profile to decrypt the SSL, and an iRule that looks something like:
when HTTP_REQUEST {
if { ([HTTP::host] eq "www.yyy.com") and ([HTTP::uri] eq "/product/catalog/index.cgi?catalog=3455")} {
HTTP::redirect "https://zzz.ccc.com[HTTP::uri]"
}
}
This, of course, is specific to this one host and URI. If you want to do more than that, we can be more generic as well, such as:
when HTTP_REQUEST {
if {[HTTP::host] eq "www.yyy.com"} {
HTTP::redirect "https://zzz.ccc.com[HTTP::uri]"
}
}
Which would redirect all traffic from one host to the other.
Colin
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