Forum Discussion
Stuart_Feathers
Nimbostratus
Sep 28, 2012Redirect with multiple conditions
I am doing a HTTPS redirect for all of the sites at my domain. I need to make an exclusion for 2 sites so that they can be access via HTTP.
For example, any traffic to http://www.abc.com...
What_Lies_Bene1
Cirrostratus
Sep 28, 2012So, like this, I don't think the curved brackets are needed either btw;
when HTTP_REQUEST {
if { [string tolower [HTTP::uri]] starts_with "/site1" } {
HTTP::respond 301 Location "https://www.abc.com[HTTP::uri]"
}
elseif { [string tolower [HTTP::uri]] starts_with "/site2" } {
HTTP::respond 301 Location "https://www.abc.com[HTTP::uri]"
}
}
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