Forum Discussion
Randy_Mays_7798
Nimbostratus
May 14, 2010HTTPS Redirect for a specific URL, URI
I have an iRule that I have written that I think will do what I need it to do but would like someone to confirm this, or tell me what's wrong. (Joe is just an example)
when HTTP_REQUEST {
...
Kevin_Stewart
Employee
Sep 13, 2013Try these:
HTTP:
when HTTP_REQUEST {
if { ( [string tolower [HTTP::uri]] starts_with "/contact-us" ) or ( [string tolower [HTTP::uri]] starts_with "/feedback" ) } {
HTTP::redirect "https://[HTTP::host][HTTP::uri]"
}
}
HTTPS:
when HTTP_REQUEST {
if { not ( [string tolower [HTTP::uri]] starts_with "/contact-us" ) or not ( [string tolower [HTTP::uri]] starts_with "/feedback" ) } {
HTTP::redirect "http://[HTTP::host][HTTP::uri]"
}
}
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