Joe_Pipitone
Jan 20, 2010Nimbostratus
SSL redirection and rewrite
I have an iRule currently in place - what we want to do is catch for a URL with a query string that a user clicks on or enters into their browser, and if that URL is accessed insecurely, we need to redirect it securely (http to https)
The URL will look similar to:
http://ourwebsite.org/login/login-page.aspx?src=%7b3961226A-8AB0-4391-ADA1-A85AE2869824%7d
and needs to redirect while still keeping the query string to:
https://ourwebsite.org/login/login-page.aspx?src=%7b3961226A-8AB0-4391-ADA1-A85AE2869824%7d
The only iRule that I could come up with redirects ALL http traffic, but what if I want to redirect if a user goes to /log/login-page.aspx with a query string - can I catch that one and rewrite using https while keeping the URI intact?
when HTTP_REQUEST {
Redirects all to HTTPS keeps URI intact
HTTP::redirect https://[HTTP::host][HTTP::uri]
}