Forum Discussion
Dennis_Goss_70_
Nimbostratus
Dec 21, 2015iRule redirect but need some of the original PATH
Relatively new to iRules but have done a ton of scripting (PoSh, vbs, etc...) and understand the basics and have studied the http::uri, http::path and http::query built-in variables - thanks in advan...
Dennis_Goss_70_
Nimbostratus
Jan 02, 2016Thanks - the commented line works but redirects everything to the root of the site at the new location - not ideal since most folks love their deep link bookmarks...
The last line is my latest attempt - not tested yet so it may be a winner? Thanks for the help!
when HTTP_REQUEST { switch -glob [string tolower [HTTP::uri]] {
"/oas/ops/programs*" { HTTP::redirect "https://www.mycompany.com[HTTP::uri]" }
"/offices/management/ocio/eng/tacticalcommunications*" { HTTP::redirect "https://www.mycompany.com/sites/taccom" }
"/offices/management/ocio/eng/tacticalcommunications*" { HTTP::redirect [string map {"/offices/management/ocio/eng/tacticalcommunications/" "/sites/taccom/"}[HTTP::uri]]}
} }
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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