Forum Discussion
canuck
Altostratus
May 31, 2018URL redirect with multiple FQDNs
I am trying to define an iRule which will match any domain, adding www prefix and passing on. For example, if a user browses to http://abc.com or https://abc.com, redirects to https://www.abc.com. Sa...
Samir_Jha_52506
Noctilucent
May 31, 2018Slightly modified the iRule.
when HTTP_REQUEST {
if { [string tolower [HTTP::host]] contains"www" } {
HTTP::redirect "https://[getfield [HTTP::host] ":" 1][HTTP::uri]" }
else { HTTP::redirect "https://www.[getfield [HTTP::host] ":" 1][HTTP::uri]" }
}
- canuckMay 31, 2018
Altostratus
That did it. Thank you!
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
