Forum Discussion
Troy_94246
Nimbostratus
Jan 27, 2014Single I-rule with 1000+ URI Redirect
We are working on a Web site refresh and have been asked to use Big IP to redirect over 1000 pages based on URI to a different URI on same page. We have different options to do this with I-rule but I...
nathe
Cirrocumulus
Jan 27, 2014So, my way would be to use Data groups. Not sure if this is the "best" way though. Most likely a better way than a v long irule.
So create a Datagroup with all your redirects called redir_dg (for example):
/aboutus/ContactUs/index.html := /en/about/contact
etc.....
And then refer to this datagroup in an irule:
when HTTP_REQUEST {
if { [class match [string tolower [HTTP::uri]] starts_with redir_dg] } {
HTTP::redirect http://[HTTP::host][class match -value [string tolower [HTTP::uri]] starts_with redir_dg]
}
}
Hope that helps. I'm sure better iRules than I will think of a better way but it might get you started.
N
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