Forum Discussion
Joe_Pipitone
Aug 11, 2015Nimbostratus
Mobile browsers broken - https redirect
BigIP 1600's - v11.6 HF 4
I have a simple iRule that forces https and strips the www. We have a CMS running that automatically detects the user agent, and redirects the mobile browser to the mobil...
Joe_Pipitone
Aug 14, 2015Nimbostratus
The problem was the headers that I was inserting for HSTS. As soon as I removed them, safari started acting normally. Here's the full iRule that includes the header inserts. Very strange behavior, as other mobile browsers handled this just fine:
when RULE_INIT {
set static::expires [clock scan 20110926]
}
when HTTP_RESPONSE {
HTTP::header insert "Strict-Transport-Security" "max-age=15552000; includeSubDomains"
}
when HTTP_REQUEST {
if {([string tolower [HTTP::host]] starts_with "www.")} {
HTTP::redirect "https://[string range [HTTP::host] 4 end][HTTP::uri]"
return
} elseif { [TCP::local_port clientside] == 80 } {
HTTP::redirect https://[HTTP::host][HTTP::uri]
return
}
}
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