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]
}
}
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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