Forum Discussion
Angela_R_33237
Nimbostratus
Oct 19, 2005Simple iRule help (I hope) -- non-www to www.
How do I set up an iRule to redirect non-www requests to the www of that domain.
Example:
domain1.com --> www.domain1.com
domain2.com --> www.domain2.com
We ha...
Colin_Walker_12
Oct 19, 2005Historic F5 Account
Your rule would indeed be simple. It'd be something like:
when HTTP_REQUEST {
if {[string tolower [HTTP::host] ] contains "www" } {
pool your_poolname
} else {
HTTP::redirect "http://www.[HTTP::host][HTTP::uri]"
}
}
Hope this helps,
-Colin
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