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: ...
Michael_Yates
Dec 14, 2011Nimbostratus
Hi Sean M.
Sure, you can do that using URI::query and specifying the parameter.
Here is an example:
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]"
}
}
Hope this helps.
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