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...
hoolio
Cirrostratus
Jun 28, 2010Or maybe you could change the rule to check if the host isn't www.yyy.com redirect to www.yyy.com? Either way, adding debug logging is a good way to figure out what code is executing:
when HTTP_REQUEST {
log local0. "[IP::client_addr]:[TCP::client_port]: [HTTP::method] request to [HTTP::host][HTTP::uri]"
if { ([HTTP::host] != "www.yyy.com") } {
log local0. "[IP::client_addr]:[TCP::client_port]: Matched host check, redirecting."
HTTP::redirect "http://www.yyy.com"
}
}
Aaron
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
