Forum Discussion

Vim_113268's avatar
Vim_113268
Icon for Nimbostratus rankNimbostratus
Nov 28, 2009

I need Help - Need to create Redirect

I need to Implement an iRule on the ABC VIP so that any attempt to hit

 

 

aaa.bbb.com/starss on this VIP will redirect back to / (ex. aaa.bbb.com/ )

 

 

I want this to happen for both Http and https requests.

 

 

please advise ASAP.

 

 

Thanks.

 

5 Replies

  • Below is the exact example:

     

     

     

    Redirect eigther http or https for

     

     

    one.test.com/xxx

     

     

    to

     

     

    https://one.test.com/
  • Here is an example

     
     when HTTP_REQUEST { 
        if { ([HTTP::host] eq "one.test.com" ) and ([HTTP::uri] eq "/xxx" ) } { 
            HTTP::redirect "https://one.test.com/" 
           } 
     } 
     

    If you are trying to redirect HTTPS to another HTTPS please keep inmind that it won't work unless the SSL is terminated at the F5.

    I hope this helps.

    Bhattman
  • BATTMAN

     

     

    i am currently using following:

     

     

     

    when HTTP_REQUEST {

     

     

    if { [HTTP::uri] equals "/xxx" } {

     

    HTTP::redirect "https://abc.xyz.com/"

     

    }

     

    }

     

     

     

    will it work?