Forum Discussion

kg_50758's avatar
kg_50758
Icon for Nimbostratus rankNimbostratus
Jul 25, 2007

Standard HTTPs redirect

I am new to iRules, when i tried the standard https redirect if the url ends with '.do, could not get it to working. iRules i used is as below

 

 

when HTTP_REQUEST {

 

if { [HTTP::uri] ends_with "*.do" } {

 

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

 

}

 

}

 

 

Also tried below iRules, just to redirect all the trafic to https, even this is not working for me.

 

when HTTP_REQUEST {

 

set uri [HTTP::uri]

 

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

 

}

 

 

I want https redirect to happen on the client to f5 and not on the f5 to server.

 

client--->f5--->server

 

 

Searched for the solution in the forum, could not find one. Can some one HELP.

 

Thanks in Advance

 

KG

15 Replies