F5 is upgrading its customer support chat feature on My.F5.com. Chat support will be unavailable from 6am-10am PST on 1/20/26. Refer to K000159584 for details.

Forum Discussion

Preet_pk's avatar
Preet_pk
Icon for Cirrus rankCirrus
Aug 09, 2023
Solved

URL redirection iRule

Hi,

Please let me know the iRule  for below URL redirection. Below are the details.

https://excample.com:9085/labs  to redirect to  https://excample.com/labs 

  • Hi Preet_pk,

    Can you try this iRule on the virtual server with 9085 port?

    when HTTP_REQUEST {
    	if { [HTTP::host] eq "excample.com:9085" && [string tolower [HTTP::uri]] eq "/labs" } {
    		HTTP::redirect https://excample.com/labs
    		return
    	}
    }

     

1 Reply

  • Hi Preet_pk,

    Can you try this iRule on the virtual server with 9085 port?

    when HTTP_REQUEST {
    	if { [HTTP::host] eq "excample.com:9085" && [string tolower [HTTP::uri]] eq "/labs" } {
    		HTTP::redirect https://excample.com/labs
    		return
    	}
    }