Forum Discussion
mark_57891
Nimbostratus
Sep 16, 2009Rewrite URLs question
Hello all. I'm trying to create an iRule to perform URI rewrite when a match is encountered. Essentially, I want to rewrite URL 1 into URL 2, where the wi_id=value will constantly change.
...
The_Bhattman
Nimbostratus
Sep 16, 2009How about the following:
when HTTP_REQUEST {
if { [HTTP::query] starts_with "wi_id" } {
switch -glob [HTTP::uri] {
"/gopwfbasic?*" -
"/gopwfcomplex?*" {
set rewrite [substr [HTTP::query] 0 0]
http::redirect "http://mynewappserver/webdynpro/dispatcher/sap.com/zmobile/Zmobile?$rewrite"
}
}
}
}
I hope this helps
CB
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