Forum Discussion
ukitsysadmin_95
Jan 17, 2011Nimbostratus
Old URL 404, compare URI with external data group file
Hello all, I was wondering if someone could help me or point me in the correct direction. I have about 40,000 URL's and growing which need redirecting, here is an...
Colin_Walker_12
Jan 20, 2011Historic F5 Account
If you're on 9.4.7 you'll want to use the findclass command.
Your class would look like:
class_name {
"man-in-band http://www.xyz.com/event/98473/man-in-band",
"band-in-park http://www.xyz.com/venue/9383783/band-in-park"
}
And your logic would change slightly to:
when HTTP_REQUEST {
set uri_token [string range [HTTP::path] [expr {[string last / [HTTP::path]] + 1}] end]
}
when HTTP_RESPONSE {
if {[HTTP::status] == 404} {
set red_uri [findclass $uri_token class_name " "]
HTTP::redirect $red_uri
}
}
Colin
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