Post of the Week: HTTP Redirect using Datagroups
In this "Post of the Week" video, we discuss HTTP redirects and how to use datagroups and iRules to do these redirects. If you have lots of URLs to redirect, then you might want to consider using so...
Published Sep 30, 2017
Version 1.0ltwagnon
Ret. Employee
Joined May 15, 2019
ltwagnon
Ret. Employee
Joined May 15, 2019
dragonflymr
Cirrostratus
Mar 04, 2019Hi,
Assuming that you using
$uri
in if
and then use $old_uri
inside this will not work, so I suggest something like that:
if ( [set new_uri [class match -value [HTTP::uri] eq DATAGROUP]] ne ""} {
HTTP::uri "$new_uri"
pool $XYZ
}
It is assuming that your DG is set like that: old_uri := new_uri
- old_uri - key name you use to match with DG
- new_uri - new URI that should be set if there is match on old_uri
Piotr