Forum Discussion
arripay_6298
Nimbostratus
Jun 28, 2016Redirect Problem
Hi,
using a single and pool with multiple hosts, trying to do a redirect based on host name and uri match using the following.
when HTTP_REQUEST {
log local0. "Request: [HTTP::host][HTTP::ur...
Samir_Jha_52506
Noctilucent
Jun 28, 2016Avoid multiple uri in same condition. I believe
matchclass will be good option.
Use below irule.
class redirectURIs {
/abc/book
/manage/pqr
/checkin/xyz
}
when HTTP_REQUEST {
if { [matchclass [HTTP::uri] contains redirectURIs] } {
HTTP::redirect "http://www.website2.com"
}
}
THi
Nimbostratus
Jun 28, 2016"matchlass" is depreciated command already in sw v10. You should use "class" commands instead. See: https://clouddocs.f5.com/api/irules/class.html
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