Forum Discussion
1 Reply
Sort By
- JRahmAdmin
Try this:
when HTTP_REQUEST { if { [llength [split [HTTP::host] "."]] < 3 } { HTTP::redirect https://www.[HTTP::host][HTTP::uri] } }
More details and some example tclsh code in this similar thread.
Please advise on irule for redirect traffic from http to https appending "www." to all sub websites. example http traffic from somewebsite.com\more\mo to https://www.somewebsite.com\more\mo
Try this:
when HTTP_REQUEST {
if { [llength [split [HTTP::host] "."]] < 3 } {
HTTP::redirect https://www.[HTTP::host][HTTP::uri]
}
}
More details and some example tclsh code in this similar thread.