Forum Discussion
Nathan_at_Hamli
Nimbostratus
Oct 06, 2014Writing First iRule, redirects and rewrites based on URI
Looking for some assistance as a total iRule novice:
The expected behavior is that if an HTTP request against the virtual server is for the root it will redirect to /pwclient/ on the default pool, ...
Oct 06, 2014
Don't have access to an LTM now, but try this?
when HTTP_REQUEST {
set uri [string tolower [HTTP::uri]]
if { $uri == "/") } {
HTTP::redirect "/pwclient/"
} elseif { $uri starts_with "/copy" } {
set uri [string map -nocase {"/copy" "/helixws"} $uri]
HTTP::uri $uri
pool piperxpress_copy_tcp_443_pool
}
}
/Patrik
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