Forum Discussion

MikeyG's avatar
MikeyG
Icon for Nimbostratus rankNimbostratus
Oct 06, 2020
Solved

iRule creation based on URI

Disclaimer, I know little to nothing about creating iRules, hence why I am here. I need to create the following iRule. create an irule that will inspect the URI of the incoming request and make a ...
  • Enes_Afsin_Al's avatar
    Oct 06, 2020

    Hi Mike,

    when HTTP_REQUEST {
    	if { [HTTP::host] equals "abc.mike.com" } {
    		switch [HTTP::uri] {
    			"/abc1" { HTTP::redirect https://help.mike.com/abc1 }
    			"/abc2" { HTTP::redirect https://help2.mike.com/abc2 }
    			default { HTTP::redirect https://abc2.mike.com }
    		}
    	}
    }