cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
639
Views
0
Helpful
1
Replies

INTERESTING - ACE config and URL manipulation

dsliz
Level 1
Level 1

Hi

My customer has an interesting requirement for his web/java based application (SAP).

There are multiple services (each has its own domain) running on the same server all services sharing the same TCP port. All of them require a correct path in the HTTP(S) header to display a desired web page. However if somebody is accessing (via HTTP or HTTPS) the service without any path in the URL (for a login page) the ACE should redirect a correct URL and path for the login page to the client. In other words...

1) http://sap.mydomain.com ---redirect to---> https://sap.mydomain.com/abc/init.do?language=de

2) https://sap.mydomain.com ---redirect to---> https://sap.mydomain.com/abc/init.do?language=de

3) http://sap.mydomain.com/abc/init.do?language=de  ---redirect to---> https://sap.mydomain.com/abc/init.do?language=de

4) https://sap.mydomain.com/abc/AnythingElse ---NOT to be redeirected but sent unchanged---> https://sap.mydomain.com/abc/AnythingElse

Do you have any ideas how can I achieve this?

I tried something but it still doesn't work. Relevant config is attached.

Thanks in advance for your replies and happy to reward you 5* when we get it up and running

drsl

1 Reply 1

Jorge Bejarano
Level 4
Level 4

Dsliz,

One of them may look like this:

policy-map multi-match SAP-HTTP-REDIRECT-POLICY-MAP

  class SAP-REDIRECT-CM

    loadbalance vip inservice

    loadbalance policy SAP-REDIRECT-POLICY

    loadbalance vip icmp-reply

class-map match-any SAP-REDIRECT-CM

  3 match virtual-address 10.148.185.249 tcp eq ww

policy-map type loadbalance first-match SAP-REDIRECT-POLICY

  class class-default

    serverfarm SAP-HTTP-REDIRECT

serverfarm redirect SAP-HTTP-REDIRECT

  rserver SAP-HTTP-REDIRECTOR

    inservice

rserver redirect SAP-HTTP-REDIRECTOR

  conn-limit max 4000000 min 4000000

  webhost-redirection https://sap.mydomain.com/abc/init.do?language=de 301

  inservice

You did not include the rest of the configuration for example for this:

class L7CM-B2C-DEMOSHOP

Additionally, you may need to see about matching seconday cookies as shown here, since it is required to match after "?" sometimes.

http://www.cisco.com/en/US/docs/interfaces_modules/services_modules/ace/vA5_1_0/command/reference/policy.html#wp2336441

Jorge

Review Cisco Networking for a $25 gift card