Forum Discussion
Consolidating iRule for multiple redirects using data group???
Hi Team,
Is there a way to consolidate multiple Vanity URLs that is redirected to a single URL aside from typing them one by one? I was looking at Data Group list but not sure how to incorporate it with the iRule script and what command to use? Appreciate the help!
example: www.mywebsite.com/links/page1 www.mywebsite.com/folders/reports www.mywebsite.com/contacts/
Redirect to http://www.mynewsite.com/consolidated/
1 Reply
- Kevin_Stewart
Employee
Define your string-based data group like this (just the string, no value needed) -example name (my_uri_datagroup):
/links/page1 := /folders/reports := /contacts/ :=Then your iRule might look something like this:
when HTTP_REQUEST { if { [class match [string tolower [HTTP::uri]] starts_with my_uri_datagroup] } { HTTP::redirect "http://[HTTP::host]/consolidated/" } }
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* 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