Forum Discussion
jgranieri_42214
Nimbostratus
May 07, 2012Need to collect dynamic content and using in HTTP redirect
Hello All,
I have been searching devcentral for the proper way to collect dynamic content in a URL and redirecting to a completely different url and using that dynamic content.
here is an example of what I need to do:
https://abc.123.com/how/do/I/collect%the%next?&Param_1=&Param_2=9448134
There were always been dynamic content after Param2="xxxxxxxx" (10 numeric characters)
I need to redirect the above link to a completely new URL with the dynamic content after Param_2="xxxxxxxx"
https://def.456.com/this/is/a/diff%url%&Param_1=&Param_2=
From what I have been reading it sounds like there are a few ways to do this. I dont seem to able to find enough examples to implement this with findstr or getfield. Then I saw some other examples parsing and storing certain variables with http payload.
Any help getting started would be appreciated. Thanks everyone !
- hoolio
Cirrostratus
Is it the value of param2 you want to parse? If so you can use [URI::query [HTTP::uri] param2] to get the value. - jgranieri
Nimbostratus
Thanks Aaron let start with that and build an irule to handle that. I will reply once I have constructed a working irule - jgranieri
Nimbostratus
finally finished the irule and it turns to to be simple enough to do:when HTTP_REQUEST { This will be "Param_2 Value" set ID [URI::query [HTTP::uri] Param_2] redirect to "https://123.abc.com/NY/Rangers/Game5.jsp?Param_1=&Param_2=$ID" }
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