Forum Discussion

Zuke's avatar
Icon for Cirrostratus rankCirrostratus
Aug 04, 2021

Simple HTTP::redirect iRule results in a reset

I first tried doing this with a policy but that didn't work. When I added this iRule, both the customer and I tested and it worked fine. Now I'm getting error messages.

Professor X's website "" is moving to ""

There are multiple hosts that are moving to this virtual server, so I wanted to switch on the host and do the redirects. When I add a log message, it shows the $hostLowered as ""

when HTTP_REQUEST priority 1 {
    set host [HTTP::host]
    set hostLowered [string tolower $host]
    set uri [HTTP::uri]
    set uriLowered [string tolower $uri]
    switch -glob -- $hostLowered
    "professorx.*"   { 
        HTTP::redirect ""

  • Fixed by adding event disable after the redirect