Forum Discussion
adamo_1516
Nimbostratus
Aug 14, 2007exception logic for selective https redirect
yes, i'm losing my mind.
i've got a rule we put in place to take specific subdomains and statically redirect the URL's to https. it works great, but we're now seeing we need to add exception...
hoolio
Cirrostratus
Aug 14, 2007If you want to redirect if the host starts with sub1 or sub2, but not if the URI contains the special string, you can use 'not':
when HTTP_REQUEST {
if { ([HTTP::host] starts_with "subdomain1." or [HTTP::host] starts_with "subdomain2.") and (not ([HTTP::uri] contains "SpecialUrl"))} {
HTTP::redirect https://[HTTP::host][HTTP::uri]
}
}Aaron
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
