Forum Discussion
Brian_Kenworthy
Aug 30, 2012Nimbostratus
Redirect to New Page but Pass Query String Parameters
Hi All,
Need some advice on what an iRule would look like to do this....We are moving from legacy ASP listeners to .net listeners, but we don't want the client to change their endpoint ...
Michael_Yates
Aug 30, 2012Nimbostratus
Hi Brian,
You can do multiple string map and replaces at the same time.
[string map {"value1" "replacevalue1with" "value2" "replacevalue2with" }
You could look for an [HTTP::uri] that contains both vendor and asp? and do something like this:
when HTTP_REQUEST {
if { [HTTP::uri] contains "vendor" && [HTTP::uri] contains ".asp?" } {
set uri [string map {"vendor" "listeners" ".asp?" ".aspx?"} [HTTP::uri]]
HTTP::redirect "https://[HTTP::host]$uri"
}
}
Hope this helps.
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