04-11-2011 11:10 PM
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
04-11-2011 11:49 PM
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
04-12-2011 12:06 AM
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.
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
04-12-2011 12:20 AM
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
04-12-2011 12:41 AM
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
04-12-2011 12:46 AM
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
04-12-2011 02:11 AM
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
04-12-2011 09:36 AM
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.
Rewriting the URI or the payload of pages is not supported. Only HTTP redirections will work with the ACE.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide