Forum Discussion

Phil_53695's avatar
Phil_53695
Icon for Nimbostratus rankNimbostratus
Oct 11, 2011

URI redirect

Maybe it's been a long day. I have to change a URI in production in a few days so that if a user comes in and uses the URI "BM" it will change it to "beatme".

 

In my UAT I have 2 VIP(s) one on 80 and the other on 443.

 

And everytime I come up with an irule it always takes me back to the http VIP.

 

In production we only use the 80 VIP with an https redirect. I just need to figure out why it's doing this so as to prove that my irule will work in prod.

 

I think it would since in prod it has the 80 redirect to 443 but just need to get a proof of concept before putting it in prod.

 

Anyone run into something like this before?

 

 

Thanks
  • Hi Phil,

     

     

    I have seen things similar to what you are describing before and it was generally due to the application hard coding the Protocol. I would suggest getting a program like Fiddler2 or HTTPWatch to see the behavior while the application is running.

     

     

    If it is the application hard coding the Protocol then it can easily be corrected with either a Stream Profile, or an HTTP::header Location replacement on the response.

     

     

    The other possibility could be how you are doing the redirect. Could you post the sanitized iRule so we could take a look?
  • in case of location header, redirect rewrite in http profile may be helpful.

     

     

    sol6912: Configuring an HTTP profile to rewrite URLs so that redirects from an HTTP server specify the HTTPS protocol

     

    http://support.f5.com/kb/en-us/solutions/public/6000/900/sol6912.html

     

     

    anyway, if protocol is in payload, stream profile/irule would be helpful as Michael suggested.