Forum Discussion
Fluidetom_12222
Cirrus
Dec 19, 2016What's the best approach for an http:redirect with exceptions?
Hey guys,
We're going to move a SharePoint site and all its subsites to a new location in our SharePoint farm.
I need to create new iRule to redirect all users to the new site except for one partic...
Fluidetom_12222
Cirrus
Dec 21, 2016thanks for your reply. This is the final working version of my iRule
when HTTP_REQUEST {
set PATH [string tolower [HTTP::path]]
Check if path starts with /my_old_site/
if {($PATH starts_with "/my_old_site") and not ($PATH starts_with "/my_old_site/subsite_we_need_to_keep")} then {
Modify HTTP::path to replace original request with new address
HTTP::redirect [string map {my_old_site /my_new_site} [HTTP::path]]
}
}
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
