Forum Discussion
snowfly_86261
Nimbostratus
Mar 12, 2010replace http:// to https:// problems
Dear all,
I have a problem about it
My Topology as under
client <-- HTTPS --> F5-LTM <-- HTTP --> httpServer
(1) client type in https://www...
hoolio
Cirrostratus
Mar 12, 2010You can create a custom HTTP profile with rewrite redirects enabled and add it to your VS to have LTM rewrite the http:// reference to https. You can check the online help on the HTTP profile page for details on the options.
Or you could use an iRule, but this would be more complicated and less efficient:
http://devcentral.f5.com/wiki/default.aspx/iRules/RewriteHTTPRedirectHostname.html
Just change the hostnames in the example to http:// and https://:
when HTTP_RESPONSE {
Check if server response is a redirect
if { [HTTP::header is_redirect]} {
Log original and updated values
log local0. "Original Location header value: [HTTP::header value Location],\
updated: [string map -nocase "http:// https://" [HTTP::header value Location]]"
Do the update, replacing http:// with https://
HTTP::header replace Location \
[string map -nocase "http:// https://" [HTTP::header value Location]]
}
}
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