Forum Discussion
Brian_Kenworthy
Nimbostratus
Feb 10, 2011HTTP>HTTPS Redirect to different domain
Hi all, this should be pretty simple....hopefully.
I have a simple HTTP>HTTPS redirect in place for a domain --> HTTP::redirect "https://[HTTP::host][HTTP::uri]"
We have several su...
hoolio
Cirrostratus
Feb 10, 2011I like nit-picking to get the most efficient solution :). I was being a dolt and thinking of another recent conversation where we needed the matched name and value for later logic. In this case, you just need the matched value, so something like this should work:
when HTTP_REQUEST {
set host [class search -value domainredirects equals [string tolower [HTTP::host]]]
if { $host ne "" } {
HTTP::redirect "https://$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