ACE re-direct/re-write URL to a subpage of the VIP

Unanswered Question
Apr 30th, 2009
User Badges:

Hi,


I'd like to re-direct/re-write the URL that a user is sent to when they go to a particular http VIP.


A present the process is handled by an Apache server that we are looking to remove from the backend and utilise the available functionality of the ACE.


When a user goes to "test1.sap.brm.pri" I would actually like them to go to "test1.sap.brm.pri/irj/portal" and NOT test1.sap.brm.pri/index.html which is what is currently happening (the real backend URL wanted being http://vex1ci.sap.brm.pri:56400/irj/portal).


I created the following action list:-


action-list type modify http test1.sap.brm.pri-REDIRECT-URL

header rewrite request Host header-value "test1.sap.brm.pri" replace "test1.sap.brm.pri/irj/portal"


which at first glance I though had done the trick but unfortunately /irj/portal is being inserted into all requests to URLs that start "test1.sap.brm.pri" and not JUST "test1.sap.brm.pri", i.e.


"test1.sap.brm.pri/sap/monitoring/SystemInfo" is automatically changed into "test1.sap.brm.pri/irj/portal/sap/monitoring/SystemInfo" which doesn't exist.


Is what I'm after possible?


thanks in advance

Matthew

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 0 (0 ratings)
Loading.
Gilles Dufour Wed, 05/06/2009 - 01:57
User Badges:
  • Cisco Employee,

Matthew,


some theory first.

A url like http://mycompany.com/path/file is composed of a hostname : mycompany.com and a uri: /path/file


When this url is sent by a computer it is clear split in those 2 parts:


GET /path/file....

Host: mycompany.com


So, when you do a header rewrite to modify the host, all you do is change the line Host: ....


Clearly this won't work.


You have to

1/ create a class-map to match the url "/" and/or "/index.html"


2/ create a redirect serverfarm/rserver to point to the new url.


3/ create a policy-map type http loadbalance to link the url class-map with the redirect and to the link the class-default to your serverfarm


Hope this helps.


Gilles.

Actions

This Discussion