Forum Discussion
scott_poquette_
Nimbostratus
Aug 02, 2006How to append www to a url
Anyone know how I would rewrite the following rule for v9.x?
else if (http_header("Host") starts_with "mysite") {
redirect to "http://www.mysite.com/%u"
}
Or is there ...
hoolio
Cirrostratus
Aug 02, 2006You could either redirect to www.mysite.com, or rewrite the request before it's sent to the pool and not send a rediret back to the client.
Redirect:
when HTTP_REQUEST {
if { HTTP::host starts_with "mysite" }{
HTTP::redirect http://www.mysite.com/[HTTP::uri]
}
}Or you could rewrite the request and send it to the pool:
when HTTP_REQUEST {
if { HTTP::host starts_with "mysite" }{
HTTP::host www.mysite.com
}
}Aaron
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
