Forum Discussion
smiley_dba_1116
Nimbostratus
Jun 28, 2010HTTP header redirect
V.10.2
Having a issue when trying to do a redirect. When a client types in www.xxx.com, we want the load balancer to look at the header, and auto redirect to www.yyy.com. Currently, I trie...
Michael_Yates
Nimbostratus
Jun 28, 2010The Rule that is giving you an Error doesn't have your previous "if not" matching requirement.
Try this:
when HTTP_REQUEST {
if { !([HTTP::host] equals "www.xxx.com") } {
HTTP::redirect "http://www.yyy.com"
HTTP::respond 301 Location "http://www.yyy.com"
}
}
HTTP::redirect - gives a 302 Temporary Redirect
HTTP::respond 301 Location - gives a 301 Permanent Redirect.
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