URL-Redirection using ACE

Unanswered Question
Jan 9th, 2008

Hi,


when a user hit a VIP with particular url string,can i redirect that url to another VIP ?


1.EG: 10.10.10.1/crm ,has to redirect to another VIP 10.10.10.10.

2. 10.10.10.1/erp , has to redirect to another VIP 10.10.10.20.


Will it possible in ACE ?


  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 0 (0 ratings)
Loading.
Gilles Dufour Wed, 01/09/2008 - 02:41

you can creat an http redirect message and have it sent to the client based on the url requested.

The client will then come back to the new url provided in the redirected.


However, why use a redirect ?

Can't you just map the specific url to a specific serverfarm that would be different depending on the url ?

You avoid the delay of sending the redirect and waiting for the client to reopen a connection to the appropriate vip.


Gilles.

dinesh1977 Wed, 01/09/2008 - 03:06

Hi Gillies

thanks for the reply ..


1 .suppose when a user accessing particular url using the VIP 10.10.10.1/crm . This request has to go to another VIP 10.10.10.10 , where i will bound the real servers which is running those services .


2.suppose when a user accessing particular url using the VIP 10.10.10.1/ERP . This request has to go to another VIP 10.10.10.20 , where i will bound the real servers which is running those services .


How to map the specific url to a specific serverfarm ?


If you have any sample scripts for this , please send to me .. It will be very helpful . ( I don't have that much exposure in ACE ) .


Once again thanks for your support

Gilles Dufour Wed, 01/09/2008 - 04:28

Here is an example.

All traffic matching /crm will go to linux1, traffic matching /erp will go to linux2 and all the rest will go to server 3.


No need for redirect.


class-map type http loadbalance match-any url-crm

2 match http url /crm.*

class-map type http loadbalance match-any url-erp

2 match http url /erp.*

class-map match-all vip-192.168.20.21

2 match virtual-address 192.168.20.21 tcp eq 80


policy-map type loadbalance first-match url-select

class url-erp

serverfarm linux1

class url-crm

serverfarm linux2

class class-default

serverfarm linux3


policy-map multi-match SLB1

class vip-192.168.20.21

loadbalance vip inservice

loadbalance policy url-select


Actions

This Discussion