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 ...
Brian_Kenworthy
Sep 07, 2012Nimbostratus
Thanks Aaron, that is exactly what I was looking for. Michael, I tried looking at the HTTP::header location field and I wasn't seeing the new URL in the location field, not sure if I had it correct.
I have another wrinkle with this implementation...we currently have an iRule that is looking at the old URIs and directing the traffic to a different pool based on the URI value. I have added the re-write code to the existing iRule and it seems to work, however, the string tolower funtion doesn't appear to be working:
when HTTP_REQUEST {
switch -glob [string tolower [HTTP::uri]] {
"/client/order.asp*" -
"/vendor/status.asp*" -
"/xml/order.asp*" -
"/xml/status.asp*" {
log local0. "Rewriting [HTTP::uri] to [string map {"Vendor" "Listeners" ".asp?" ".ashx?"} [HTTP::uri]]"
HTTP::uri [string map {"Vendor" "Listeners" ".asp?" ".ashx?"} [HTTP::uri]]
pool beta.res-direct.com_B2B_HTTP
}
We basically want to remove any case sensitivity on the URI.
Thanks so much for your help, this forum loaded with awesome folks.
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