Forum Discussion

Gregg_Freeman's avatar
Gregg_Freeman
Icon for Nimbostratus rankNimbostratus
Aug 10, 2021

Redirtct HTTPS request with multiple embedded URL Statements

I need to redirect the following example to a new website URL. https://test.test.com/MDR/LauncherInterface.aspx?host=https://test.test.com/MDR&numid=11111&numid=1111&username=1111&userpass=1111
I need to redirect both URL statements to https://test2.test.com. Using iRules in my F5 load balancer I am able to redirect the first statement but I am unable to figure out how to redirect the second as well.

1 Reply

  • Hi Gregg Freeman,

    when HTTP_REQUEST {
    	if { [HTTP::host] equals "test.test.com" } {
    		HTTP::redirect https://test2.test.com[string map "test.test.com" "test2.test.com" [HTTP::uri]]
    		return
    	}
    }