Forum Discussion

roggy32_78322's avatar
roggy32_78322
Icon for Nimbostratus rankNimbostratus
Sep 14, 2009

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]

 

 

}

 

}

 

 

11 Replies

  • I would think so, assuming it's just an error about the cert not being chained to a valid root certificate.

     

     

    Do you get an error like "There is a problem with this website's security certificate."? If you accept the warning and then click on the lock icon to view the server cert, what do you see on the last tab for "Certification Path"?

     

     

    Aaron