Forum Discussion
f5jr_28664
Nimbostratus
May 13, 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. Can someone please help me out here with exact irule to do this with LTM ?
Thanks a Bunch
newbie
2 Replies
- hoolio
Cirrostratus
Hi,
Which LTM version are you doing this on? There was a bug with HTTP::path fixed in 10.2.1HF1. If you could use 10.2.1HF1 or higher this would be simpler to do.
Aaron - Colin_Walker_12Historic F5 AccountIf 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
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