Configure Regular Expression on Cisco ACE
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-13-2011 02:59 AM - edited 03-04-2019 01:35 PM
Hi all,
I need to configure a load balance based on url filtering:
All the traffic sent to https://home/can should be load balanced on a group of server (eg. x1, x2, x3); while all the traffic sent to https://home/can/<any-sub-directory> should be load balanced on other server (ex. X4 X5).
My question is: how can I configure correct url regular expression to correctly filter the two above url?
I'm thinking something like this but I'm not sure if I on the right way:
- "https://home/can" or https://home/can\n ------> for the 1st
- https://home/can/.* --------> for the 2nd
Many thanks in advance for your support
Gianluca
- Labels:
-
Other Routing
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-13-2011 04:33 AM
You can create two Class maps type https and specify something like the bellow
(config)# class-map type https inspect HTTP_INSPECT
(config-cmap-http-insp)# match header Host header-value
.*home/can
For the second one make it like
match header Host header-value
.*home/can.*
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-13-2011 04:49 AM
Many thanks for your answer very clear.
Only the last doubt: since the directory 'can' of my path could change, If I need to make two generic filter without specify the exact name:
- https://home/
--> to server x1,x2,x3 - https://home/
/sub-directory ---> to server x4,x5
For the 1st filter, can I configure somethink to filter a generic directory excluding subdirectory?
Something like https://home/*/
Many thanks for you support.
Gianluca
