Forum Discussion
Dave_Wagner
Jan 13, 2012Nimbostratus
Need help with iRule redirect
I have the following iRules (work fine)
when HTTP_REQUEST {
if {[HTTP::host] equals {siteA.com}}{
HTTP::redirect "https://www.siteB.com/promo/biz_tv_..._id=350042"
}
if {[HTTP::host] equals {www.siteA.com}}{
HTTP::redirect ""
}
}
I need to add the following redirect but can't seem to get it to work
if {[HTTP::host] contains {siteA.com/whole}}{
HTTP::header "https://www.siteB.com/promotions/biz_tv_0330/735_729.jsp?WT.mc_id=171074" }
It always defaults to the first line. The problem is I need both IDs so I can't drop the first redirect .
Any help is appreciated.
Dave
- richard_77048NimbostratusI am guessing the "HTTP::header" is a typo and you meant "HTTP::redirect". I will go on that assumption.
when HTTP_REQUEST { if { [HTTP::host] equals "siteA.com" } { switch [HTTP::path] { "/whole" { HTTP::redirect "https://www.siteB.com/promotions/biz_tv_0330/735_729.jsp?WT.mc_id=171074" } default { HTTP::redirect "https://www.siteB.com/promo/biz_tv_..._id=350042" } } } if { {[HTTP::host] equals {www.siteA.com}}{ HTTP::redirect "https://www.siteBcom/promotions/biz...xid=350042" } }
- Dave_WagnerNimbostratusRichard,
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