Forum Discussion
Brad_Parker
Nov 20, 2015Cirrus
You could try something like this. It works with if /wps/portal/company/personal is the name of the object in the data group and is contained in the path it will be replaced with the value of the datagroup object, /personal.
when HTTP_REQUEST {
if { [class match [string tolower [HTTP::path]] contains uri_dg]}{
set matchURI [class match -name [string tolower [HTTP::path] contains uri_dg]
set newValue [class match -value [string tolower [HTTP::path] contains uri_dg]
set newURI [string map -nocase "$matchURI $newValue" [HTTP::uri]]
HTTP::respond 301 noserver Location "https://[HTTP::host]$newURI"
}
}