Forum Discussion
Justin_Haggerty
Nimbostratus
Dec 21, 2006redirect works on some machines, doesn't on others
I've got the following rule in place:
when HTTP_REQUEST {
if { [HTTP::host] contains "old.com" } {
HTTP::redirect "https://new.com"
}
}
What I'm trying...
hoolio
Cirrostratus
Dec 21, 2006Try logging the client IP address, HTTP host header and URI in the rule and see what the client is sending. As someone pointed out recently, the Host header is only required in HTTP 1.1, so some clients might not send it when using HTTP 1.0.
You can use something like this:
when HTTP_REQUEST {
log local0. "client [IP::client_addr] -> [HTTP::host][HTTP::uri]"
if { [HTTP::host] contains "old.com" } {
HTTP::redirect "https://new.com"
}
}The log output will be written to /var/log/ltm.
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