Forum Discussion

Deepak__M_K_165's avatar
Deepak__M_K_165
Icon for Nimbostratus rankNimbostratus
Aug 15, 2014

iRule redirection issue

Hi All,

 

I have a redirection rule applied on F5 -LTM -9.2.3 version . This is to redirect "www.webserver.com" to "https://webserver.com" some how there is an intermittent issue. Not sure if this version of F5 support this kind of iRule.

 

when HTTP_REQUEST { if {[HTTP::host] eq "www.myserver.com"} { HTTP::redirect "https://myserver.com[HTTP::uri]" } } Much appreciate the input

 

3 Replies

  • Hi

    Try making it case insensitive:

    when HTTP_REQUEST {
    
        set host [string tolower [HTTP::host]]
        if { $host eq "www.myserver.com"} { 
            HTTP::redirect "https://myserver.com[HTTP::uri]" 
        }
    } 
    

    /Patrik

    • Patrik_Jonsson's avatar
      Patrik_Jonsson
      Icon for MVP rankMVP
      What was the actual issue? I assumed it did not run, but maybe it's something else?