Forum Discussion
iRule URL redirect help required.
We would like this example URL to be redirected from:
http://link.ecm.tn.exp/81213457&Open
to be this:
http://link.ecm.tn.exp/Livelink/livelink.exe?func=LL.login&username=Anonymous&password=&NextURL=%2FLivelink%2Flivelink%2Eexe%3Ffunc%3Dll%26objId%3D81213457%26objAction%3DOpen
the yellow item is the document number
the pink item is the action, either be open or download for the vast majority of cases.
So whatever the yellow and pink values are in the first uri will have to be mirrored in the redirected url.
Any help would be greatly appreciated.
David
- Brian_69413NimbostratusThis is pretty straight forward, but you will have to do some string manipulation. Basically you will need these steps:
- David_StephensoNimbostratusHi Brian, thanks for the reply. I had sort of worked that out logically but I have no idea of the code to use. I have had no training in creating irules but have just manipulated exsisting rules on our loadbalancers.
Any code example that would fit my requirements would be a massive help
- Colin_Walker_12Historic F5 AccountThis is definitely possible, but I'd need to know a little bit more information first.
- David_StephensoNimbostratusHi Colin,
- Colin_Walker_12Historic F5 AccountCool, then this shouldn't be horrible. You'd need something like:
when HTTP_REQUEST { if {[scan [HTTP::uri] "/%d&%s" dnum action] == 2} { HTTP::redirect "http://link.ecm.tn.exp/Livelink/livelink.exe?func=LL.login&username=Anonymous&password=&NextURL=%2FLivelink%2Flivelink%2Eexe%3Ffunc%3Dll%26objId%3D$dnum%26objAction%3D$action" } else { log local0. "URI: [HTTP::uri] did not match" } }
- David_StephensoNimbostratusColin,
Recent Discussions
Related Content
* 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