Forum Discussion
Benjamin_Moore_
Nimbostratus
Aug 20, 2014How do I redirect to a URL
I want all traffic destined to a VIP over HTTPS to be redirected to https://servername/cgi-bin/wf.html. How do I accomplish this withing LTM?
- Aug 20, 2014
It looks like this creates a redirect loop since the redirected request has the same hostname as your if statement. Try:
when HTTP_REQUEST { if {[string tolower [HTTP::host]] equals "webdrop.xxx.com" and not ([string tolower [HTTP::uri]] equals "/cgi-bin/wf.html")} { HTTP::redirect "https://webdrop.xxx.com/cgi-bin/wf.html" } }
shaggy_121467
Cumulonimbus
Aug 20, 2014It looks like this creates a redirect loop since the redirected request has the same hostname as your if statement. Try:
when HTTP_REQUEST {
if {[string tolower [HTTP::host]] equals "webdrop.xxx.com" and not ([string tolower [HTTP::uri]] equals "/cgi-bin/wf.html")} {
HTTP::redirect "https://webdrop.xxx.com/cgi-bin/wf.html"
}
}
nitass
Employee
Aug 20, 2014i am confused. what are the request url you want to redirect and the redirect url?
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
