Forum Discussion
TJ_Vreugdenhil
Cirrus
Jun 14, 2015Cisco ACE to F5 - Adding WWW
Does the following Cisco ACE config:
policy-map type loadbalance first-match wsredirect-l7
class-map type http loadbalance match-any no-www-redirect-l7
2 match http header Host header-value "[^www\.]..*\...*"
rserver redirect no-www-redirect
webhost-redirection http://www.%h%p 302
inservice
convert to the following F5 iRule config?
when HTTP_REQUEST {
if {![string tolower [HTTP::host]] contains "www." } {
HTTP::redirect "http://www.[HTTP::host][HTTP::uri]"
log local0. "Add in "www" if not present and use a 302 response"
}
}
(We are redirecting back to HTTP to do additional redirects).
Thanks!
1 Reply
- giltjr
Nimbostratus
I personally would use starts_with instead of contains, but contains will work.
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