Forum Discussion
Glenn_Ruffus_10
Nimbostratus
Mar 06, 2014HTTP redirects with data group list
I need to perform many HTTP 302 redirects on one virtual server and would like to have a single iRule that calls on a single string type data group list to get the URLs to redirect to. In this partic...
richard_77048
Nimbostratus
Mar 06, 2014I think you are looking for something like this:
when HTTP_REQUEST {
Use [HTTP::path] or [HTTP::uri] depending on your needs
set REQUEST [HTTP::path]
if { [class match $REQUEST equals HTTP_redirects_list] } {
set REDIRECT [class match -value -- $REQUEST equals HTTP_redirects_list]
HTTP::redirect $REDIRECT
}
}
edit: sorry about the formatting
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