Forum Discussion
Ben_Wilson_2412
Cirrus
Aug 30, 2013Portable root domains redirects
Hi,
We're looking to redirect a bunch of domains from "root" requests to "www".
The rule has to allow additional subdomains through, but be portable for many root domains.
My idea is to split th...
Kevin_Stewart
Employee
Sep 05, 2013I had an extra square bracket in there. Try this:
when HTTP_REQUEST {
set proto "http://"
if { [PROFILE::exists clientssl] == 1 } {
set proto "https://"
}
if { [llength [split [HTTP::host] "."]] < 3 } {
HTTP::redirect "${proto}www.[HTTP::host][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