Forum Discussion
Chris_123510
Nimbostratus
Sep 17, 2013Simple URL redirect iRule
I am still very new to iRules, and I am trying to get the code correct for a simple URL redirect. The VS already has an iRule that will redirect traffic from port 80 to 443. Plus, I will need it to w...
nathe
Cirrocumulus
Sep 17, 2013Something like this should help:
when HTTP_REQUEST {
if { (([HTTP::host] equals "abc.com") or ([HTTP::host] equals "www.abc.com")) } {
HTTP::redirect "https://www.def.123.com/ghi"
}
}
Or you could simply use this line instead and this will catch all host types.
if {HTTP::host] contains "abc.com"}{
Hope this helps, N
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