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...
hoolio
Cirrostratus
Mar 18, 2011Sorry, there was a missing double quote:
when HTTP_REQUEST {
Check for requests to /retrieve.asp
if { [string tolower [HTTP::path]] eq "/retrieve.asp"}{
Redirect the request to /Servicepages/RetrieveDocument.aspx
with the guid parameter value set as did
HTTP::redirect "/Servicepages/RetrieveDocument.aspx?did=[URI::query "?&[HTTP::query]" &guid]"
}
}
Michael, the ?&[HTTP::query] and &guid parts are necessary to work around a bug in the URI::query command. See the bottom of the URI::query wiki page for details:
http://devcentral.f5.com/wiki/default.aspx/iRules/uri__query.html
Aaron
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