Forum Discussion
Riaz_125436
Nimbostratus
Jul 02, 2014redirect for http and https VIPs
Hi,
Need help to write an iRule to redirect traffic for http and https VIPs as:
HTTP VIP:
http://abc.com/ ----- redirect to http://abc.com/welcome
http://abc.com/welcome ----- redirect...
Kevin_Stewart
Employee
Jul 02, 2014Try this:
when HTTP_REQUEST {
switch [string tolower [HTTP::uri]] {
"/" -
"/welcome" {
HTTP::redirect "http://[HTTP::host]/en/default/welcome"
}
}
}
Assuming you're offloading the SSL for your HTTPS VIP traffic, the iRule should be the same except for the redirect scheme value (https:// vs. http://).
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