Forum Discussion

yihwen_100254's avatar
Icon for Nimbostratus rankNimbostratus
Jun 14, 2011

Generic iRule to redirect to




I am planning to create an generic iRule to perform a to I know in the F5 v10.x.x, there is a _sys_https_redirect and that will actually redirect any http:// to https://



But as most users love to type, I am thinking of creating a generic iRule so that I can use it for all my domains. Below is the iRule to perform what I want but this is not generic.





if {


[HTTP::host] eq "" } {


HTTP::redirect "[HTTP::uri]"







If I have another domain called, using this iRule above will not work. What is the best way of achieving this?


16 Replies