Forum Discussion
DarkSideOfTheQ_
Nimbostratus
Jan 27, 2009genric http to https question
I've done a couple of http to https irules and now find mysyelf wondering if I can accomodate this new request. We are using a single hostname for different applications (ex. server1.domain.com/click/...
Deb_Allen_18
Jan 28, 2009Historic F5 Account
Hey Jennifer, thanks for posting!
One small but important correction:
That code actually only changes the protocol scheme.
If a non-standard (<>80) port is used, the value in the Host header will contain the port, which will in turn be included in the return value for HTTP::host.
In that case, simply using [HTTP::host] will result in a redirect response to the same non-standard port over HTTPS (which in most cases will fail). Which just means that if you're redirecting traffic rec'd on another port, you will need to use the [getfield [HTTP::host] ":" 1] trick that's in the 301/302 codeshare redirect samples:
http://devcentral.f5.com/wiki/default.aspx/iRules/HTTPToHTTPSRedirect_301.html
http://devcentral.f5.com/wiki/default.aspx/iRules/HTTPToHTTPSRedirect_302.html
/d
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
