Forum Discussion

t_rajneesh_2252's avatar
t_rajneesh_2252
Icon for Nimbostratus rankNimbostratus
May 03, 2019

Irule query

Hi, I have a webfarm redirection VIP on F5. Most of the legacy urls are redirected by webservices./middle ware team on these servers. But for one request, they were not able to do redirection, hence i have return irule and it is working fine.

 

when HTTP_REQUEST {

 

set host [string tolower [HTTP::host]]

 

set uri [string tolower [HTTP::uri]]

 

if { $host == "abc" && $uri == "/" } {

 

HTTP::redirect "; }

 

elseif { $host == "; && $uri == "/support" }

 

{ HTTP::redirect ";

 

}

 

Now my question is what if other url lets say or [] are trying to access , will these get redirected to backend webservers, does, i rule allows it to pass to nodes to process request, if above irule criteria doesn't match or i need to added any more statement in irule to allow other https/http request to sent to webserver backend to process request.

 

2 Replies

  • Hamish's avatar
    Hamish
    Icon for Cirrocumulus rankCirrocumulus

    You may want to edit your question and put your iRUle in a code block. If it's easier to read you're more likely to get someone to take the trouble to go through it.

     

  • This condition won’t work because of the semi colon after closing double quote

    elseif { $host == "www.abc.com"; && $uri == "/support" }