Forum Discussion

  • when HTTP_REQUEST { if { [HTTP::host] contains "visitor.qwerty.com" } { pool visitor-stg} "default" { HTTP::redirect "https://loginstage.qwerty.com/oamfed/idp/initiatesso?providerid=Visitor" } } } this is what i am looking for but getting error. 01070151:3: Rule [/Common/visitor] error: /Common/visitor:5: error: [undefined procedure: default]["default" { HTTP::redirect "https://loginstage.qwerty.com/oamfed/idp/initiatesso?providerid=Visitor" }] /Common/visitor:9: error: [undefined procedure: ][ ] /Common/visitor:10: error: [command is not valid in the current scope][}]
  • I think you're missing a closing brace.

     when HTTP_REQUEST {
       if { [HTTP::host] contains "visitor-stg.cummins.com" } {
         HTTP::redirect "https://loginstage.cummins.com/oamfed/idp/initiatesso?providerid=Visitor"
       } elseif {  [HTTP::uri] starts_with "/visitor.cummins.com" } {
         pool visitor-stg
       }
     }
    

    This parses correctly.