Forum Discussion
Craig_Gibb_1781
Nimbostratus
Apr 22, 2015Problem with multiple redirects in irule
Hi anyone suggest how this irule could work better iam having problems with it at the moment too many redirects and the syntax is not that great.
when HTTP_REQUEST {
if { [HTTP::uri] contains "...
nitass
Employee
Apr 23, 2015can 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]"
}
}
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