Forum Discussion
Group List String Concatenation
I'm slowly migrating web applications from IIS 6 servers to IIS 8.5. What I would like to do is use a one Group List to check if an HTTP_REQUEST ends_with /webappname or contains /webappname/
Is there a way to do this with one Group List?
In other languages I have used the & or + for string concatenation how would I do it with a Group List? Will the example below (with the right code) work correctly?
when HTTP_REQUEST { if { [class match "[string tolower [HTTP::uri]]/" ends_with GL.2003] | [class match "[string tolower [HTTP::uri]]/" contains GL.2003 & "/" ]} { pool server.2003 } else {pool server.2012 } }
1 Reply
- Michael_Jenkins
Cirrostratus
Try something like this. I think it will work. Can't test it right now to verify. You'd probably be better off not using a "." in your names... so I'd change them to GL2003 and server2003 and server2012 based on your example. Also make sure your group list items end in a "/" for the to work correctly.
when HTTP_REQUEST { set uriLower [string tolower [HTTP::uri]] As long as your group list items end in a "/" this should work if { [class match "${uriLower}/" ends_with GL2003] || [class match "${uriLower}/" contains GL2003] } { pool server2003 } else { pool server2012 } }
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* 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