Technical Forum
Ask questions. Discover Answers.
cancel
Showing results for 
Search instead for 
Did you mean: 

Simple HTTP::redirect iRule results in a reset

Zuke
Cirrostratus
Cirrostratus

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 "professorx.xmen.com" is moving to "https://www.xmen.com/professorx"

 

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 "professorx.xmen.com"

 

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 "https://www.xmen.com/professor-x-website"     }   }  }
1 ACCEPTED SOLUTION

Zuke
Cirrostratus
Cirrostratus

Fixed by adding event disable after the redirect

View solution in original post

1 REPLY 1

Zuke
Cirrostratus
Cirrostratus

Fixed by adding event disable after the redirect