IRule for URL redirect
We need to configure an IRule in F5 for redirecting URL. The source URL will have an object id in its URI which we need to fetch and append it in the destination URL.
Source URL can come in two formats as shown below and object id in it is highlighted in bold.
http://mytest.mytest.com/webtop/drl/objectId/0900e6cc814a810c/chronicleId/0900e6cc814a810c/versionLabel/CURRENT
http://mytest.mytest.com/webtop/drl/objectId/0900e6cc81095ef9/chronicleId/0900e6cc81095ef9
We need to fetch the object id (0900e6cc814a810c and 0900e6cc81095ef9) from above sample URL and append it in destination redirect URL as shown below
https://redirect.mytest.com/api/LinkServ?objectID=”WebtopObject ID”
https://redirect.mytest.com/api/LinkServ?objectID=”0900e6cc814a810c ”