Forum Discussion
deni_22991
Nimbostratus
Jan 04, 2011redirect to https multiple uri's while letting others pass through
I am trying to create an iRule that will force ssl on specific multiple URI's under a specific host while letting those that do not need SSL to pass through. I am working on BIG-IP 9.4.7 Build 320.1 ...
Chris_Miller
Altostratus
Jan 07, 2011Let's re-add -glob for a second. So, your rule should look like this:
when HTTP_REQUEST {
if { [HTTP::host] equals "appsf5.sd.gov" } {
log local0. "User went to http://[HTTP::host][HTTP::uri]"
switch -glob [string tolower [HTTP::uri]] {
"/applications/dp42launchpad*" {
HTTP::redirect "https://[HTTP::host]/applications/dp42launchpad/logon.aspx"
log local0. "Requested http://[HTTP::host][HTTP::uri] and was redirected to https://[HTTP::host]/applications/dp42launchpad/logon.aspx" }
"/applications/st01fastfile*" {
HTTP::redirect "https://[HTTP::host]/applications/st01fastfile/login.asp"
log local0. "Requested http://[HTTP::host][HTTP::uri] and was redirected to https://[HTTP::host]/applications/st01fastfile/login.asp" }
"/applications/gf79biggame*" {
HTTP::redirect "https://[HTTP::host]/applications/gf79biggame/login.asp"
log local0. "Requested http://[HTTP::host][HTTP::uri] and was redirected to https://[HTTP::host]/applications/gf79biggame/login.asp" }
"/applications/gf82*" {
HTTP::redirect "https://[HTTP::host][HTTP::uri]"
log local0. "Requested http://[HTTP::host][HTTP::uri] and was redirected to https://[HTTP::host][HTTP::uri]" } } } }
Let me know if the page doesn't load.
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
