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

irule: redirect to different paths with same host.

franktruong3
Nimbostratus
Nimbostratus

Hi,

I'm new at F5 and iRule.

I try to redirect from root location to different path on the same node.

https://abc.domain.com -> https://abc.domain.com/path

What is wrong with this rule?

=================iRule===================================================

 

when HTTP_REQUEST {

  if { ([string tolower [HTTP::host]] eq "abc.domain.com") } {

       HTTP::redirect "https://abc.domain.com/path"

   }

}

=========================================================================

2 REPLIES 2

SanjayP
MVP
MVP
 if { ([string tolower [HTTP::host]] eq "abc.domain.com") and ([HTTP::uri] eq "/")} {

It works….Thanks SanjayP!!!