Forum Discussion
briancapps_1029
Nimbostratus
Sep 21, 2010iRule redirect - change domain, path but keep unique ID
I'm having trouble getting an iRule right that redirects domain, modifies path, but maintains a trailing unique identifier. I intend to redirect:
http://documents.test.com/retrieve.asp?guid...
Lambera_53322
Nimbostratus
Mar 17, 2011Well it looks like he was pretty close to a solution as the following works but with some minor issues:
when HTTP_REQUEST {
if { [HTTP::uri] starts_with "/retrieve.asp"}{
HTTP::redirect "http://[string map {".../retrieve.asp?guid=" ".../Servicepages/RetrieveDocument.aspx?did="} [string tolower [HTTP::host]][HTTP::uri]]"
}
}
What I am unable to account for is that R in retrieve.asp could either be upper or lower. Currently in QA I am using two Irules on the VIP due to this issue so that it will catch both upper and lower. I would like to consolidate this into a single Irule.
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