Forum Discussion
lbong_53781
Nimbostratus
Oct 24, 2008URI insertion
Hi
I am trying to do the following and not sure how it can be done in iRule.
http://somehost.com/new?custid=12345 redirect to http://somehost.com/goto?id=345678&custid=12345
Basically the "custid=12345" is dynamic and the redirected url will have whatever "custid=12345" after the "&". The "goto?id=34567" will remain the same throughout.
http://somehost.com/new?custid=13456 redirect to http://somehost.com/goto?id=345678&custid=13456
http://somehost.com/new?custid=21364 redirect to http://somehost.com/goto?id=345678&custid=21364
Thanks.
--
LB
1 Reply
Sort By
- hwidjaja_37598
Altostratus
try this out:when HTTP_REQUEST { if { not ([HTTP::uri] starts_with "/goto") } { regsub {.+\?} [HTTP::uri] {/goto?id=345678\&} newUri HTTP::redirect "$newUri" } }
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