Forum Discussion
Howard_Poz_1055
Nimbostratus
May 19, 2006"String based" Redirect Question -
Hi Folks (i'm still new to iRules). Looking for verification to see if I'm on the right track with this iRule below (think I'm close).
I want uri's containing the text "/ABCHome.aspx?_act=ShowMap" to use the normal port-80 pool. Conversely, I'd like the absence of that string to do a redirect to https. Would you be kind enough to please verify if this iRule looks to be in order ? I'd greatly appreciate it - thank you very much - Howard P.
==============================================================
when HTTP_REQUEST {
if { [HTTP::uri] contains "/ABCHome.aspx?_act=ShowMap" } {
pool HTTP_pool
} else {
HTTP::redirect "https://%5bHTTP::host%5d%5bHTTP::uri%5d"
}
===============================================================
- Martin_MachacekHistoric F5 AccountHoward,
when HTTP_REQUEST { if { [HTTP::uri] contains "/ABCHome.aspx?_act=ShowMap" } { pool HTTP_pool } else { HTTP::redirect "https://[HTTP::host][HTTP::uri]" } }
- steven_forti_83
Nimbostratus
I would like to do almost the same thing. I would like to redirect several areas of a page based on URI to https while leaving the rest of the pages which do not require ssl as http. I estimate that my web developers will have about 6 URI's which will require http to https redirection. How can I accomplish this?
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