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
Aug 30, 2013Try this:
when HTTP_REQUEST {
if { [llength [split [HTTP::host] "."]] < 3 } {
HTTP::redirect "http://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