roggy32_78322
Sep 14, 2009Nimbostratus
Redirecting out of HTTPS
I want to redirect out of https if the customer is in https and clicks on certain links or request is in a list of uri that are not in my https strings list. but I don't want to to be redirected if the request is of a certain file type. What i have so far and it's not working is the following.
when HTTP_REQUEST {
set inbound_uri [string tolower [HTTP::uri]]
if {([matchclass $inbound_uri ends_with $::test_ends_with])}{
basically if it ends with example .jpg or .swf do nothing leave them in ssl
return
}
elseif {([matchclass $inbound_uri starts_with $::test_rewards])}{
if request matches my links that should not be https it redirects you.
HTTP::redirect http://[HTTP::host][HTTP::uri]
}
elseif {not ([matchclass $inbound_uri starts_with $::test_https])}{
if the request isn't in my https list then redirect them
HTTP::redirect http://[HTTP::host][HTTP::uri]
}
}