Forum Discussion
roggy32_78322
Nimbostratus
Sep 14, 2009Redirecting 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
- The_Bhattman
Nimbostratus
Is the SSL terminating on the BIGIP or is it on the pool member? - roggy32_78322
Nimbostratus
terminating on the f5. Looks like it worked but there was a conflicting irule on the http side redirecting some back to the https side. - hoolio
Cirrostratus
I didn't think most browsers would generate a security warning if certain content was served via HTTPS from a non-local domain. If you use HttpFox for Firefox or Fiddler for IE, what request generates the warning? What is the exact text of the warning? - roggy32_78322
Nimbostratus
So, there wouldn't be a certificate error usually if an ssl page had content from two separate ssl sites if one doesn't match the url you went to in the address bar? - roggy32_78322
Nimbostratus
Maybe my rewrite code is too all inclusive I used - hoolio
Cirrostratus
Posted By robert.henson@fishnetsecurity.com on 09/15/2009 7:34 AM
- roggy32_78322
Nimbostratus
fiddler didn't show any errors? But if we use IE to goto the page it has a bar pop-up at the top says problems with the certificate? it is because we have some certificates that are local for testing and trusting manually and some from webtrends and sharethis are real? - roggy32_78322
Nimbostratus
this is the content after accepting the errors. - hoolio
Cirrostratus
I'd guess that's an indication from the browser of an improperly chained server certificate--not an issue with some of the content being served from an external domain. - roggy32_78322
Nimbostratus
So in production environment with a valid certificate from a valid CA like entrust we wouldn't be seeing this error?
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects