cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
5577
Views
0
Helpful
7
Replies

Cisco ACE- Module URL Re-Write (NOT SSL Re-Write)

Rehan Khan
Level 1
Level 1

Hi Everyone,


I need some information regarding URL rewrite in Cisco ACE module.


User types www.example.com in the browser. It resolves to an VIP on ACE. The VIP is load balancing two servers. When users types www.example.com the application redirects it to www.example.com/abc/def on one of the servers.


Now I need the ACE to do the following


When users types www.secondexample.com (different domain) in the browser, it resolves to the same VIP on ACE. I need the ACE to re-write the url to be www.example.com/abc/def/ghi (Same domain as the first however different path)


Current OS Version: c6ace-t1k9-mz.A2_2_2.bin - No issues if an upgrade is required.


Regards,


Rehan

7 Replies 7

Daniel Arrondo Ostiz
Cisco Employee
Cisco Employee

Hi Rehan,

Please, have a look at the link below. It explains how to achieve this.
http://www.cisco.com/en/US/partner/docs/interfaces_modules/services_modules/ace/v3.00_A2/configuration/slb/guide/classlb.html#wp1151822

Regards

Daniel

Hi Daniel,


Thanks for the quick reply. I have followed the mentioned document. Maybe my syntax is incorrect becuase I was not able to make it work.


Below are the two ways I tried to configure it.



  • header rewrite request host header-value www\.(example)\.com replace www.example.com/irj/portal/anonymous?guest_user=anon_en
  • header rewrite request host header-value "www.example.com" replace "www.example.com/irj/portal/anonymous?guest_user=anon_en"


The main problem is that application appends /irj/portal in the end of any request, of www.example.com or www.secondexample.com so the URL i get in the end is

www.example.com/irj/portal/anonymous?guest_user=anon_en/irj/portal - This is incorrect URL

I have limited knowledge about header/url re-writing & using regular expressions.


Regards,


Rehan

Hi Rehan,

You got me confused there. The host header should only contain the DNS name of the server (www.example.com), but never the path of the request.

Could you please paste the HTTP response (taken from a traffic capture) that the server is currently sending and what exactly you would like the ACE to send back to the client? I can then see if it's possible to do it or not.

Daniel

Hi Daniel,


The problem is the servers in production. I will try to get http watch logs. What I have seen is that the application appends /irj/portal and the final output what I see in the address bar is : www.example.com/irj/portal


Regards,


Rehan

Hi Rehan,

What you see in the address bar is the combination of the host and URI headers, but we need to understand what exactly it is that you need to rewrite.

To do that we need to see what it is being sent by the server and what you need the client to see instead.

Daniel

Hi Daniel,


Basically there are two domains one is example.com and other one is secondexample.com. Currently there is one VIP configured on ACE. The two URL's mentioned above are being resolved from dns to this VIP. Now when the user types the first URL it is working fine and the final output in the browser is www.example.com/irj/portal. This full url with the /irj/portal is appended from the application itself not from ACE and it works fine.


What we want to achieve is that when the user types www.secondexample.com it should go to www.example.com/irj/portal/anonymous which is not working.


I will still try to get some captures next time I am allowed to make changes to the production.


Regards,


Rehan

you can probably achieve this by using HTTP redirection. use a class map to match the Host field / URI you want to match and foward the request

to a redirect serverfarm with the right target.

http://www.cisco.com/en/US/partner/docs/interfaces_modules/services_modules/ace/v3.00_A2/configuration/slb/guide/rsfarms.html#wp1046009

Rewriting the URI or the payload of pages is not supported. Only HTTP redirections will work with the ACE.

Review Cisco Networking for a $25 gift card