Forum Discussion
Sean_M__85845
Dec 14, 2011Nimbostratus
Performing a Redirect with URL Variables
I am trying to create an iRule that will perform a redirect using information within the original URL and creating a redirect with that information. Here's and example of what it would look like:
Original URL's:
http://www.abc.com/directorya/llisapi.dll/?nodeid=67770153&vernum=1
OR
http://www.abc.com/directorya/llisapi.dll/?objid=67770153&objaction=open&viewtype=1
New URL:
http://www.xyz.com/Pages/MigrationID.aspx?migrationID=67770153
Basically I need to look for either the "nodeid" or "objid" in the original URL and use that same ID in the new URL as the "migrationID". Any suggestions on what the iRule would look like?
- hoolioCirrostratusHi Sean,
- Michael_YatesNimbostratusHi Sean M.
when HTTP_REQUEST { if { [HTTP::uri] contains "nodeid" } { HTTP::redirect "http://www.xyz.com/Pages/MigrationID.aspx?migrationID=[URI::query [HTTP::uri] nodeid]" } if { [HTTP::uri] contains "objid" } { HTTP::redirect "http://www.xyz.com/Pages/MigrationID.aspx?migrationID=[URI::query [HTTP::uri] objid]" } }
- Sean_M__85845NimbostratusMichael-
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