Forum Discussion
Jim_Couch_16225
Nimbostratus
Jan 27, 2015iRule to redirect HTTPs to a third party URL
I've tried several of the examples for iRule redirects but I am not having much luck. Basically, when public traffic comes to a VIP on the F5 on port https, I want to be able to read what the origin...
Jim_Couch_16225
Nimbostratus
Jan 27, 2015So, the ] turned out to just be sloppy copy/pasting (and editing out the real details of the iRule) but you pointed me in a great direction. What I realized is that it is case sensitive. In another sample I am using the tolower but it doesnt seem to work. But if I type in the MyUrl.com exactly like I am matching then I get the redirect. So, I am pasting a better example in hopes that you know what I am missing with the tolower portion.
when HTTP_REQUEST {
if { (([string tolower [HTTP::host]] contains "My-Survey.com") or ([string tolower [HTTP::host]] contains "MySurvey.com")) } {
HTTP::redirect "https://www.surveymonkey.com/s/MySurvey"
}
}
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