Forum Discussion
Ron_130795
Oct 20, 2015Nimbostratus
301 Redirect
How do I write an iRule for the following 301 redirect?
301 Redirect: https://investor.tradeking.com/Modules/NewAccount/newAccount.php ----> https://application.tradeking.com/?ola=tks
Redirect w/ Query example: https://investor.tradeking.com/Modules/NewAccount/newAccount.php?ADTRK=ACJwhatever&siteid=123456 ----> https://application.tradeking.com/?ola=tks&ADTRK=ACJwhatever&siteid=123456
- ssievers_87378Nimbostratus
Hi,
like this I think:
when HTTP_REQUEST { if { [HTTP::uri] starts_with "Modules/NewAccount/newAccount.php" }{ set params [getfield [HTTP::uri] "?" 2] set newdestination "https://application.tradeking.com/?ola=tks&$params" HTTP::respond 301 Location "$newdestination" } }
- ssievers_87378Nimbostratus
more readable...
when HTTP_REQUEST { if { [HTTP::uri] starts_with "Modules/NewAccount/newAccount.php" }{ set params [getfield [HTTP::uri] "?" 2] set newdestination "https://application.tradeking.com/?ola=tks&$params" HTTP::respond 301 Location "$newdestination" } }
- Ron_130795NimbostratusThank you ssievers. I will give this s try.
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