Forum Discussion

Jamie_Cravens's avatar
Jamie_Cravens
Icon for Nimbostratus rankNimbostratus
Mar 22, 2010

Redirect w/ "$" in the URL

I get the following error w/ irule:

 

 

TCL error: RULE_192.168.150.89 HTTP_REQUEST - cant read Logon: no such variable while executing HTTP::redirect https://nc5.pdhi.com/portalPage.aspx?_CX=3e15310d-0249-415e-882a-5ea48fd0b1bf$Logon$0

 

 

The iRule is

 

when HTTP_REQUEST {

 

if {[HTTP::host] contains "harringtonhealth.com"}

 

{pool harringtonhealth.com_8080

 

return

 

}

 

if {[HTTP::uri] contains "/print"}

 

{pool umr.com_print_7070

 

return

 

}

 

if {[HTTP::uri] contains "/websurvey"}

 

{pool umr.com_print_7070

 

return

 

}

 

if {[HTTP::uri] contains "member3"}

 

{HTTP::redirect "https://nc5.pdhi.com/portalPage.aspx?_CX=3e15310d-0249-415e-882a-5ea48fd0b1bf$Logon$0"

 

}

 

else {pool umr.com_8080}

 

}

 

 

 

How do I get the iRule to not treat $Logon$ as a variable?

1 Reply

  • Hi Jamie,

     

     

    You should be able to escape the $'s with a backslash:

     

     

    HTTP::redirect "https://nc5.pdhi.com/portalPage.aspx?_CX=3e15310d-0249-415e-882a-5ea48fd0b1bf\$Logon\$0"

     

     

    Or for v10, you could try wrapping the redirect line in curly braces (this may lead to a parser error in older versions upon config reload):

     

     

    HTTP::redirect {https://nc5.pdhi.com/portalPage.aspx?_CX=3e15310d-0249-415e-882a-5ea48fd0b1bf$Logon$0}

     

     

    Aaron