Forum Discussion
DM_5174
May 19, 2011Nimbostratus
Multiple URI matching redirect
Hi All,
I was trying to accoplish the following things using a class or "string tolower" one-on-one matching to redirect the URI.
Can anyone please help or could suggest the best way to accompl...
DM_5174
May 20, 2011Nimbostratus
HI Bhattman,
I have followed the wiki and based on the example, how do I call the class in the irule? I tried to create a data group but could not figure out how to do so.
How would you use the "class" statement with LTM version 9.x? Do I use the class statement in the actual irule or call it using a matchclass?
thanks,
DM
class URIredirects {
"/old-service/old-app1/ https://www.mysite.com/new-service/new-app100"
"/old-service/old-app2/ https://www.mysite.com/new-service/new-app200"
"/old-service/old-app3/ https://www.mysite.com/new-service/new-app300"
"/old-service/old-app4/ https://www.mysite.com/new-service/new-app400"
"/old-service/old-app5/ https://www.mysite.com/new-service/new-app500"
}
when HTTP_REQUEST {
set location [findclass [HTTP::uri] $::URIredirects " "]
if { $location ne "" }
HTTP::redirect $location
}
}
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