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 ...
deni_22991
Nimbostratus
Jan 11, 2011The iRule has the 403 logging but when I try the pages, only the https pages come up. The http pages give me a page cannot be displayed.
Tue Jan 11 06:47:58 CST 2011 tmm tmm[2048] Rule apps_withssl HTTP_REQUEST: User went to http://appsf5.sd.gov/applications/HC70SBI/default.asp
Tue Jan 11 06:47:58 CST 2011 tmm tmm[2048] Rule apps_withssl HTTP_RESPONSE: 403 for /applications/HC70SBI/default.asp
Tue Jan 11 06:47:58 CST 2011 tmm tmm[2048] Rule apps_withssl HTTP_REQUEST: User went to http://appsf5.sd.gov/applications/HC54ApprovedProducts/Main.asp
Tue Jan 11 06:47:58 CST 2011 tmm tmm[2048] Rule apps_withssl HTTP_RESPONSE: 403 for /applications/HC54ApprovedProducts/Main.asp
Tue Jan 11 06:48:06 CST 2011 tmm tmm[2048] Rule apps_withssl HTTP_REQUEST: User went to http://appsf5.sd.gov/applications/hc54contractoraccess/Logon.asp
Tue Jan 11 06:48:06 CST 2011 tmm tmm[2048] Rule apps_withssl HTTP_RESPONSE: 403 for /applications/hc54contractoraccess/Logon.asp
Tue Jan 11 06:48:09 CST 2011 tmm tmm[2048] Rule apps_withssl HTTP_REQUEST: User went to http://appsf5.sd.gov/applications/HC70SBI/default.asp
Tue Jan 11 06:48:09 CST 2011 tmm tmm[2048] Rule apps_withssl HTTP_RESPONSE: 403 for /applications/HC70SBI/default.asp
Tue Jan 11 06:48:14 CST 2011 tmm tmm[2048] Rule apps_withssl HTTP_REQUEST: User went to http://appsf5.sd.gov/applications/gf82/login.asp
Tue Jan 11 06:48:14 CST 2011 tmm tmm[2048] Rule apps_withssl HTTP_REQUEST: Requested http://appsf5.sd.gov/applications/gf82/login.asp and was redirected to https://appsf5.sd.gov/applications/gf82/login.asp
Tue Jan 11 06:48:18 CST 2011 tmm tmm[2048] Rule apps_withssl HTTP_REQUEST: User went to http://appsf5.sd.gov/applications/gf82/login.asp
Tue Jan 11 06:48:18 CST 2011 tmm tmm[2048] Rule apps_withssl HTTP_REQUEST: Requested http://appsf5.sd.gov/applications/gf82/login.asp and was redirected to https://appsf5.sd.gov/applications/gf82/login.asp
Tue Jan 11 06:55:07 CST 2011 tmm tmm[2048] Rule apps_withssl HTTP_REQUEST: User went to http://appsf5.sd.gov/applications/HC54ApprovedProducts/Main.asp
Tue Jan 11 06:55:07 CST 2011 tmm tmm[2048] Rule apps_withssl HTTP_RESPONSE: 403 for /applications/HC54ApprovedProducts/Main.asp
Tue Jan 11 06:55:08 CST 2011 tmm tmm[2048] Rule apps_withssl HTTP_REQUEST: User went to http://appsf5.sd.gov/applications/HC54ApprovedProducts/Main.asp
Tue Jan 11 06:55:08 CST 2011 tmm tmm[2048] Rule apps_withssl HTTP_RESPONSE: 403 for /applications/HC54ApprovedProducts/Main.asp
Tue Jan 11 06:55:09 CST 2011 tmm tmm[2048] Rule apps_withssl HTTP_REQUEST: User went to http://appsf5.sd.gov/applications/HC54ApprovedProducts/Main.asp
Tue Jan 11 06:55:09 CST 2011 tmm tmm[2048] Rule apps_withssl HTTP_RESPONSE: 403 for /applications/HC54ApprovedProducts/Main.asp
iRule looks like this
when HTTP_REQUEST { if { [HTTP::host] equals "appsf5.sd.gov" } { log local0. "User went to http://[HTTP::host][HTTP::uri]" set site [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]" } } } } when HTTP_RESPONSE { if { [HTTP::status] eq "403" } { log local0. "403 for $site" }}
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
