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 port 80 and if the uri begins with a specific string "/xxxxx" i need it to need to pass the traffic to a pool listening on port 80 and for everthing else send it to a different pool accepting traffic on port 443 (these pools contain the same nodes listening on different ports.)
is it possible to create an irule to accomplish this task ?
someone knows of another way to accomplish this task that would be appricated to.
regards
Tobin
2 Replies
- L4L7_53191
Nimbostratus
This 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 - Colin_Walker_12Historic F5 AccountA very similar request was made in another thread. The solution there is a good one and worth checking out:
Click here
Colin
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
