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 to accomplish is if a user enters our old hostname they automatically get redirected to the new hostname, using ssl. Both of the hostnames have the same IP address in DNS. This rule is kind of hit or miss. We are having the most problems on clients that are using Windows PC's. They never get redirected, and are getting a page can't be displayed in IE, and "The connection has been reset" in Firefox.
It seems to work 100% of the time from my Mac and Ubuntu boxes.
Is there something I'm missing?
4 Replies
- hoolio
Cirrostratus
Try 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.when HTTP_REQUEST { log local0. "client [IP::client_addr] -> [HTTP::host][HTTP::uri]" if { [HTTP::host] contains "old.com" } { HTTP::redirect "https://new.com" } }
- Deb_Allen_18Historic F5 AccountThe clients are most likely being redirected, but are unable to follow it completely. You can see if LTM is sending the redirect and whether it is being followed by looking at a packet trace between the client and LTM, and you can see if the browser received & followed it using HTTPWatch (IE) or LiveHeaders (FireFox).
- Deb_Allen_18Historic F5 Account(Oops, didn't mean to cross-post hoolio. He may be onto something there as well...)
- Justin_Haggerty
Nimbostratus
I got it working, it was a problem with another iRule assigned to the virtual server interfering.
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