Forum Discussion

Ravi_110217's avatar
Ravi_110217
Icon for Nimbostratus rankNimbostratus
May 05, 2008

HTTP page redirection

Hello,

 

 

I'm having problem with HTTP page redirection IRULE. I want to redirect page from http://xyz.com to https://xyz.com

 

 

 

I have written following IRULE but it's not working for me .

 

 

HTTP_REQUEST {

 

if { [HTTP::host] equals "http://xyz.com/"} {

 

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

 

}

 

}

2 Replies

  • This is the wrong forum for you to post your irule issue. you need to post under v9.x if you have not already.

     

     

    thanks,

     

    CB

     

  • Yes, if you could please post iRules questions to the correct forums, you'll get a quicker response.

     

     

    With that being said, the issue with your iRule is that you need to remove the "http://" from your comparison. A URI is in this format

     

     

    http://[HTTP::host][HTTP::uri]

     

     

     

    -Joe