Forum Discussion

RaRye's avatar
RaRye
Icon for Nimbostratus rankNimbostratus
Dec 17, 2021

how to modify the _sys_https_redirect to exempt a specific uri and use a specific pool or node for that uri?

I am trying to modify the _sys_https_redirect to

  1. exempt a specific uri in my site
  2. browse that specific uri in HTTP
  3. use a specific pool for that uri
  4. retains the function of the _sys_https_redirect on all the rest of URIs in my site

but I can't make it work.

 

when HTTP_REQUEST {

if { ([HTTP::uri] eq "abc.com/directory/directory/") } 

pool pool-A 

else 

{ HTTP::redirect https://[getfield [HTTP::host] ":" 1][HTTP::uri] }

}

1 Reply

  • Please try below irule and confirm if it works!

    when HTTP_REQUEST {
    if { ([HTTP::uri] contains "directory/directory") } 
    { 
    pool pool-A 
    } 
    else 
    { HTTP::redirect https://[getfield [HTTP::host] ":" 1][HTTP::uri] }
    }
     

     NOTE- I have kept redirect statement as it is.