Forum Discussion
winifred_corbet
Nimbostratus
Aug 18, 2010Dozens of 301 redirects - can we use --- class 301_redirect
We have many irules that handle nothing but 301 redirects, for example, dozens of these types of entries in on irule.
We are looking for a way to streamline and make more efficient irules si...
naladar_65658
Altostratus
Aug 18, 2010I would say if you have less than a hundred of these then putting them into a switch statement would be a really efficient way for the F5 BIG-IP to process it. I have about 80 of these in one switch statement on a high volume VIP and it costs almost nothing computation wise on our 6400 series hardware.
when HTTP_REQUEST {
switch -glob [string tolower [HTTP::uri] ] {
"/cda/lots-of-stuff-here*" {
HTTP::respond 301 Location "http://www.website.com/lists/mental.../index.php"
}
"/cda/verify-specific-url*" {
HTTP::respond 301 Location ""
}
}
}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