Forum Discussion

Waylon's avatar
Waylon
Icon for Nimbostratus rankNimbostratus
Jul 19, 2018

VIP with SSL certs and Simple URL Append iRule Help

Hi,

Wondering if anyone could help me, I'm a beginner when it comes to TCL scripting so I'm hoping someone could shed some light with appending a link to an SSL URL using an iRule.

My issue... VIP configured with SSL profile with both client and server-side encryption profiles (its company security policy requirement that client to F5 and F5 to web server communication be encrypted) np, works 100%, however, I need users who connect to (VIP) https://website.testdomain.com/ to be forwarded to https://website.testdomain.com/users/signon.html

I've created an iRule and added it to the SSL VIP using the following, however, it still does not append the URL, what am I missing?

when HTTP_REQUEST {
    if { [HTTP::path] equals "/" } {
    HTTP::redirect "/users/signon.html"
    }
}

Thanks in advance!

  • Morning, you could do this with a traffic policy if iRules aren't your strong point. However if you were to do this with an iRule you need to make sure you specifiy the protocol (HTTPS) and the host when redirecting.

    when HTTP_REQUEST {
        if {[HTTP::path] equals "/" } {
            HTTP::redirect "https://[HTTP::host]/users/signon.html"
        }
    }