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

irule that only matches strict hostname

dabance
Altocumulus
Altocumulus

I am looking for below scenario

 

when accessing https://abc.xyz.com:8080 , i would like to redirect to https://cde.xyz.com:8080. Agree that is a simple irule. However when the request is https://abc.xyz.com:8080/xxx/xxx , i do not want the redirection.

 

How can we do that, any help is greatly appreciated.

 

2 REPLIES 2

You can check for the uri part of the request using [HTTP::uri]

Something like:

if { [HTTP::uri] equals "/" } { 
 #Your redirect goes here
}

dabance
Altocumulus
Altocumulus

Thank you. It worked