Forum Discussion

4 Replies

  • I think the best (most efficient) way to do this would be by using an LTM Policy to do the redirect. The following SOL document lists the steps to create a profile that will redirect HTTP requests to HTTPS, so you could just change some of the details to fit your requirements. https://support.f5.com/kb/en-us/solutions/public/14000/900/sol14996.html

    Basically, in the condition, you would check

    http-host equals abc.mydomain.com
    and
    http-uri equals /
    so it would only match an empty URI. Then you would do the
    http-reply redirect location http://abc.mydomain.com:8080/update/manifest/Login.jsp
    .

  • Tried to update my original response, but it didn't save right, so here's a copy of it again... nitass' response is what I intended. (So I'll paste it back in)

    You could also use an iRule to accomplish this, though it's less efficient since this is a pretty basic requirement, and the built in functionality would work.

    the iRule would look something like this:

    when HTTP_REQUEST {
        if {[string tolower [HTTP::host]] equals "abc.mydomain.com" && [HTTP::uri] equals "/"} {
            HTTP::redirect "http://abc.mydomain.com:8080/update/manifest/Login.jsp"
            return
    
             You could also user HTTP::respond if you wanted more control over the response
            HTTP::respond 301 Location "http://abc.mydomain.com:8080/update/manifest/Login.jsp"
        }
    }
    
  • So it looks like the host header may have been keeping it from working? If you were interested, you could set some logging statements to see what the [HTTP::host] value. But since it's working, if you don't need hostname checking, then it's all good.