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
Nimbostratus
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"
}
}
- Benjamin_Moore_Aug 20, 2014
Nimbostratus
It appears to be redirecting but part of the Web file manager (QNAP) adds some URL options, such as - /cgi-bin/wf.html?&count=0.4379764038550741 Any way to allow for this redirection? - nitassAug 20, 2014
Employee
i am confused. what are the request url you want to redirect and the redirect url? - shaggyAug 21, 2014
Nimbostratus
change the second "equals" in the if statement to "starts_with" - Benjamin_Moore_Aug 21, 2014
Nimbostratus
What I am really looking to happen is for the F5 to redirect the initial web-request and then get out of the way. Due to security concerns, I want to make sure that the user only hits the filemanager portion of the NAS (not the admin page.)
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