Forum Discussion

Ahmad_03_151082's avatar
Ahmad_03_151082
Icon for Nimbostratus rankNimbostratus
Apr 27, 2016

redirect

Dears Hope some one can help me on my issue

I already have iRules for my domain

when HTTP_REQUEST { if { [HTTP::uri] equals "/"}

{

switch [string tolower [HTTP::host]] {

"www.x.com" { HTTP::uri "/wps/portal/y" }
"www.z.com" { HTTP::uri "/wps/portal/example" }\

} }

else { switch -glob [HTTP::path]

{ "/wps/portal/w*" {HTTP::redirect "http://www.xyz.com" }

"/wps/portal/q" {HTTP::redirect "http://xyz.com/r" }
    }
            }

           }

What I need to iRule to redirect

        **www.z.com/wps/portal  TO  www.z.com/wps/portal/example**

Appreciate you help

1 Reply

  • Hello,

     

    I hope I understood your request, You have juste to had this condition:

     

    if { ([HTTP::uri] eq "/wps/portal") and ([HTTP::host] eq "www.z.com") } {

     

    HTTP::redirect http://[HTTP::host]/wps/portal/example

     

    }