Forum Discussion
nitass
Apr 23, 2015Employee
can you try something like this?
when HTTP_REQUEST {
if { [HTTP::uri] contains "/PUTV1-" } {
set host [string map {vodrr-stage.site.se stage.site.se} [HTTP::host]]
if { [HTTP::uri] starts_with "/vod" } {
set uri [string map {"/vod" "/nPVR"} [HTTP::uri]]
HTTP::redirect "http://$host$uri"
return
}
HTTP::redirect "http://$host[HTTP::uri]"
} else {
set host [string map {vodrr-stage.site.se cu.site.se} [HTTP::host]]
HTTP::redirect "http://$host[HTTP::uri]"
}
}