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/...
hoolio
Cirrostratus
Jan 27, 2009You can redirect to the same host and URI that the client requested:
http://devcentral.f5.com/wiki/default.aspx/iRules/HTTPToHTTPSRedirect_302.html
when HTTP_REQUEST {
Check if Host header value has a length
if {[string length [HTTP::host]]}{
Redirect to the requested host and URI (minus the port if specified)
HTTP::redirect https://[getfield [HTTP::host] ":" 1][HTTP::uri]
} else {
Redirect to VIP's IP address
HTTP::redirect https://[IP::local_addr][HTTP::uri]
}
}
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
