Forum Discussion

Marc_Mueller_99's avatar
Marc_Mueller_99
Icon for Nimbostratus rankNimbostratus
Feb 01, 2006

redirect doesn't work / ends in a loop

I have a problem with a redirection, it seems to end in a loop.

 

 

Let's say our website is "http://www.example.com". Now i want a redirection to "https://www.example.com" if the URI contains the string "/secure/". That meens if i access the website "http://www.example.com/secure/app1" I just want the request redirected to "https://www.example.com/secure/app1". But it looks like the browser never stop reloading the page.

 

 

I have used the following iRule:

 

 

when HTTP_REQUEST {

 

if {[HTTP::uri] contains "/secure/"} {

 

HTTP::redirect "https://[HTTP::host][HTTP::uri]"

 

}

 

else {

 

use pool TWweb

 

}

 

}

 

 

Any help would be great.

 

 

Thanks alot

 

Marc
  • I found the mistake.

     

     

    I have used this iRule on both virtual servers for http and https. So now i have only took off the iRule from the https virtual server and assigned the pool without using an iRule. That works perfectly.

     

     

    Thanks

     

    Marc