Forum Discussion
JonasD_46068
Nimbostratus
Mar 07, 2007iRule for HTTPS & www
I have 2 iRules:
when HTTP_REQUEST { HTTP::redirect https://[HTTP::host][HTTP::uri] }
and
when HTTP_REQUEST { if {[HTTP::host] equals "testdomain.net"} {HTTP::redirect "h...
Mike_Graston_10
Nimbostratus
Mar 07, 2007I actually implemented this rule and it worked like a champ. I cut and pasted it right from the text above and changed only the doamin name.The syntax errors are something that always drives me nuts so I will paste it in as I have it:
when HTTP_REQUEST {
set userhost [HTTP::host]
if { $userhost == "domain.com" } {
set userhost "www.[HTTP::host]"
}
HTTP::redirect https://$userhost[HTTP::uri]
}
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects
