Forum Discussion

V4ISHAKH's avatar
V4ISHAKH
Icon for Nimbostratus rankNimbostratus
Nov 01, 2021

Masking the redirected URL

Hi Folks,

 

I have an irule as below, after the redirection how can I keep the original URL which is https://xyz.com

 

when HTTP_REQUEST {

  if { [active_members [LB::server pool]] == 0 } 

{ if HTTP_RESPONSE

HTTP::redirect "http://sv2lxtabassit01:8080/index.html"

  }

}

 

I tried to map the URL to xyz.com but it is not working

when HTTP_REQUEST {

 if { [string tolower [HTTP::uri]] starts_with "/sv2lx" } {

  HTTP::uri [string map -nocase {"/sv2lx" "/xyz.com"} [HTTP::uri]]

 }

}

  • Hi V4ISHAKH,

    when HTTP_REQUEST {
    	if { [active_members [LB::server pool]] == 0 } {
    		HTTP::uri "/index.html"
    		# change ip
    		node 10.11.12.13 8080
    		
    		# if virtual server has server ssl profile and 8080 port is not running SSL
    		# SSL::disable serverside
    	}
    }