For more information regarding the security incident at F5, the actions we are taking to address it, and our ongoing efforts to protect our customers, click here.

Forum Discussion

Parveez_70209's avatar
Parveez_70209
Icon for Nimbostratus rankNimbostratus
Aug 12, 2014

Redirection Issue

Hi Team,

 

We are using HTTP and HTTPS Virtual-Server profile, so we are trying to put the below new Irule into both:

 

when HTTP_REQUEST { set https_uri [string tolower [HTTP::uri]] if { $https_uri equals "/broutlet/*" } { HTTP::redirect "http://abc.xyz.com/broutlet/br/pt/" } }

 

But issue is that if we try browsing ::http://test.xyz.com/broutlet/ it will redirect to http://abc.xyz.com/broutlet/br/pt/

 

But other extensions not working:, lets say if we browse something like: http://test.xyz.com/broutlet/jt/pt or any other extension.

 

How to solve this.

 

Thanks and Regards Parveez

 

1 Reply

  • Try this, which should keep the HTTP host the same (your rule above is always redirecting to abc.xyz.com) and properly redirect to URI /broutlet/br/pt/ if that's not the URI specified:

    when HTTP_REQUEST { 
     if { ! [string tolower[HTTP::uri]] eq "/broutlet/br/pt" } { 
      HTTP::redirect "http://[HTTP::host]/broutlet/br/pt/" 
     } 
    }