Chris_G_01_1415
Jun 12, 2014Nimbostratus
Solved
Irule Help
Hello, I am trying to configure the iRule below but keep running into the error below. Any one know where the braces need to go?
error: line 1: [braces are required around the expression]
when HTTP_REQUEST { if { [HTTP::host] contains “xyz.com” and [HTTP::path] eq “/assets/app/img/logo.png″ } { HTTP::redirect "http://[HTTP::host]/assets/app/img/new-logo.png" } elseif { [HTTP::host] contains “xyz.com” and [HTTP::path] eq “/assets/app/css/style.css″ }{ HTTP::redirect “http://[HTTP::host]/assets/app/css/new-style.css” } }
when HTTP_REQUEST { if { ([HTTP::host] contains "xyz.com") and ([HTTP::path] eq "/assets/app/img/logo.png") } { HTTP::redirect "http://[HTTP::host]/assets/app/img/new-logo.png" } elseif { ([HTTP::host] contains "xyz.com") and ([HTTP::path] eq "/assets/app/css/style.css") }{ HTTP::redirect "http://[HTTP::host]/assets/app/css/new-style.css" } }