Forum Discussion
sstafford
Nimbostratus
Jul 30, 2008string based https redirect
Hi all--yes I'm new.
Have a customer that needs a specific page or two forced to https when requested by a client. After poking around some, I came up with
when HTTP_REQ...
sstafford
Nimbostratus
Jul 31, 2008Ok, so the client has come back to me, as clients are wont to do, and said. "This is great, but what I really need is for everything other than those four pages to be forced to http."
So, I came up with this rule, to be implented on the https virtual server.
when HTTP_REQUEST {
switch -glob [string tolower [HTTP::uri]] {
"*alumni/giving/gift/" -
"*alumni/giving/pledge/" -
"*alumni/directory/search.aspx" -
"*alumni/directory/update.aspx" {
don't do anything...
}
}
default {
HTTP::respond 301 Location "http://[getfield [HTTP::host] : 1][HTTP::uri]"
}
}
Any comments?
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