Updated the redirect code to support force ssl for pages with forms.