Forum Discussion
Redirect iRule to Dynamic URL?
Have a quick question. I want to setup a standard "contains" iRule redirect but it needs to be able to work with dynamic URLs. What I mean by dynamic is that there is a small part of the incoming URL that is different for each session. In the URL below you can see were the =xxxx is usually a 4 digit number which is the customer code. Is this possible?
Redirect incoming requests that contain:
http://mysite.com/vbapp/customer=xxxx/goto/dev/
to
http://hosted99.com/vbapp/customer=default/login.aspx
I can get the first part of the iRule to work right because I can just state that anything containing "mysite/vbapp" will be directed regardless of the "xxxx" value. The only issue is that when it is redirected I can't get it to keep the original customer number in place.
Is this possible? Hopefully I explained it clearly.
Thanks!
James
- Michael_YatesNimbostratusHi PacketHead,
when HTTP_REQUEST { if { [string tolower [HTTP::uri]] contains "/vbapp/customer=" } { HTTP::redirect "http://hosted99.com[HTTP::uri]" } }
- nitassEmployeeThe only issue is that when it is redirected I can't get it to keep the original customer number in place.
- PacketHead_4009NimbostratusPosted By Michael Yates on 10/18/2011 02:43 PM
when HTTP_REQUEST { if { [string tolower [HTTP::uri]] contains "/vbapp/customer=" } { HTTP::redirect "http://hosted99.com[HTTP::uri]" } }
- Michael_YatesNimbostratusHi PacketHead,
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