Forum Discussion
vani_257547
Apr 05, 2016Nimbostratus
irule editor
I need Irule to redirect as below
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 }
Above irule is showing errors
Name: visitor.cummins.com Address: 10.212.16.163 Aliases: visitor-stg.cummins.com
- vani_257547Nimbostratuswhen 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][}]
- CharlesCSCirrus
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.
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