Forum Discussion
george_burtz_31
Nimbostratus
Feb 02, 2005requiring client SSL based on URI
Question about writing an iRule for v 903.
Our developers have created a web app that is listed as www.domain.com/folder. When you hit that site, IIS does a redirect to www.domain.com/...
rapmaster_c_127
Feb 04, 2005Historic F5 Account
Have you tried setting up two virtual servers, one on port 80 using profile http, and tcp, and the other using profile http, clientssl and tcp and using a rule?
Something like
virtual http-www.example.com {
destination 192.168.1.1:80
ip protocol tcp
profile http tcp oneconnect
pool non-secure
rule redir
}
virtual https-www.example.com {
destination 192.168.1.1:443
ip protocol tcp
profile myclientssl tcp
pool secure
}
rule redir {
when HTTP_REQUEST {
if {[HTTP::uri] starts_with "/folder"} {
HTTP::redirect "https://www.example.com/secure-folder"
}
}
}
This should work ok based on what you've described. What are the failure symptoms you're seeing?
Also, quick thing to check: are you sure that /secure-folder URI shouldn't be /secure-folder/ ? If the back end server issues a 3xx redirect, it's likely sending your client to an http://node url again. If that's the case, you can easily solve this by associating your ssl virtual with a new http profile and enabling the
redirect rewrite matching parameter on it.
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