Forum Discussion

Benjamin_Moore_'s avatar
Benjamin_Moore_
Icon for Nimbostratus rankNimbostratus
Aug 20, 2014
Solved

How 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?  
  • shaggy_121467's avatar
    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"
     }
    }