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...
Vijay_E
Cirrus
Dec 20, 2016Looks good. May be use a variable:
when HTTP_REQUEST {
set PATH [string tolower [HTTP::path]]
Check if path starts with /my_old_site/
if { $PATH starts_with "/my_old_site" && $PATH not (starts_with "/my_old_site/subsite_we_need_to_keep")} {
Modify HTTP::path to replace original request
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
