Forum Discussion
gh0std0g_79292
Apr 12, 2012Nimbostratus
http -> https redirection and hostname replace not working
so i have a very basic iRule for https redirects and hostname replacement and append uri...
when HTTP_REQUEST {
if { [http::host] equals "aaa.xyz.com"} {
http::...
Antony_413
Apr 12, 2012Nimbostratus
how's this go for you?
when HTTP_REQUEST {
set H [HTTP::host]
if { [string match "aaa.xyz.com" $H] } {
HTTP::redirect https://ccc.xyz.com/oa_html/ibuhpage.jsp
return
}
if { [string match "bbb.xyz.com" $H] } {
HTTP::redirect https://ccc.xyz.com/oa_html/appslocallogin.jsp
return
}
}
The code just sends a 302 HTTP redirect, shouldnt drop https://->http:// unless there is a server that isnt responding on https:// in the first place (because the 302 fails from the client browser).
...or the server itself sends its own 302 to point back at http://, but I cannot see why anyone would do that who intended to host SSL in the first place
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