Redirect from https://cardiosmart.org to https:www.cardiosmart.org
Hello,
We have an SSL cert for https://www.cardiosmart.org (does not include https://cardiosmart.org). So, users get an alert when typing the latter in their browser. We have two VS objects on our F5 (http and https) The http VS object (and irule) redirects the port 80 traffic to the https (443) VS object (and two irules).
I'm wanting to know if (and how) I can modify any of my existing iRules for either of these objects to redirect users who type https://cardiosmart.org into their browser automatically to https://www.cardiosmart.org. This would be simpler than having to re-mint our cert.
Below are the existing iRules:
HTTP_VS - Just one iRule:
when HTTP_REQUEST { if { [string tolower [HTTP::uri]] contains "/Videos.aspx" } { if {[active_members Cardiosmart_HTTP] > 0} { pool Cardiosmart_HTTP } else {HTTP::redirect "http://maintenance.acc.org" event disable all } } else { HTTP::respond 301 Location https://www.cardiosmart.org[HTTP::uri] } }
HTTPS_VS - Two iRules
when HTTP_REQUEST { if { [string tolower [HTTP::host]] contains "healthandwellness.cardiosmart.org" } { HTTP::redirect "https://www.cardiosmart.org[HTTP::uri]" } if { [string tolower [HTTP::host]] equals "http://cardiosmart.org" } { HTTP::redirect "https://www.cardiosmart.org" } }
This second rule redirects to a maintenance page.
when HTTP_REQUEST { if {[active_members Cardiosmart_HTTPS] > 0} { pool Cardiosmart_HTTPS
} else { HTTP::redirect "http://maintenance.acc.org" event disable all } }
Thanks in advance for your assistance.
Diane