Forum Discussion
tobin_dax_93013
Nimbostratus
Aug 31, 2009redirection to http or https based on uri
Hi all
i must apologise in advance for asking this, as I am new to f5's and I am not even sure this is possible,but i'll ask anyway
I have a virtual server listing on por...
L4L7_53191
Nimbostratus
Aug 31, 2009This should be very easy, although it's not 100% clear what the requirements are. I assume from the post that:
1) You want traffic destined for URI /xxxxx to stay plaintext HTTP
2) Anything else you want to send to an SSL-enabled virtual server
If this is correct, setup a client SSL virtual server, then use something like this on your port 80 virtual server - the idea is that if it matches '/xxxx' send it through to the pool. Otherwise, redirect over to HTTPS. This isn't tested, but should serve as an example.
when HTTP_REQUEST {
if { [HTTP::uri] starts_with "/xxxx" } {
pool plaintext-pool
} else {
HTTP::redirect https://[HTTP::host][HTTP::uri]
}
}
HTH,
-Matt
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
