ACE Module URI Rewriting

Unanswered Question

We are using a Ace module running version 3.0

We do have a service which can now be reached by a url like https://www.xxx.com/yyy/ < notice the last /

This is running via the Ace which terminates SSL and so on..

So now our client wants an url like  https://www.yyy.com . The backend realservers and place of virtual dirs on IIS stays the same. /yyy/

So now /yyy/ needs to be added to the backend realserver request, so the correct virtual dir is used. Therfore I need to add this Uri towards the realserver.

Any idea's. ?

thx Eddie

I have this problem too.
0 votes
  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 0 (0 ratings)
Loading.
Sean Merrow Wed, 02/17/2010 - 09:41

Hi Eddie,

Currently, the ACE will not allow you to re-write a URL on the fly, however, it will allow you to add/remove/re-write HTTP headers and perform redirects to the paths you need.

For example, if you make this change, you'll also want to account for folks that have the old URL bookmarked.

If they come into the ACE requesting https://www.xxx.com/yyy then you would use a redirect such as:

rserver redirect REDIRECT-XXX-TO-YYY
webhost-redirection https://www.yyy.com%p 301
inservice

In the above example, the /yyy would be preserved in the request so that it would still be there when it got load balanced to the rserver that requires it.  Only the hostname would be changed from xxx to yyy. A redirect rserver is documented here.

On the other hand, to meet your current requirement, if someone comes to the ACE requesting https://www.yyy.com/ then you could redirect them as follows:

rserver redirect REDIRECT--YYY
webhost-redirection https://%h/yyy 301
inservice

Although they would only connect to the hostname, they would be transparently redirected to the URL your IIS server needs. This would be used if the IIS server wants to see https://www.yyy.com/yyy

Now, if your IIS server still needs the hostname to be www.xxx.com but with the /yyy at the end, then you could re-write the HOST header from www.yyy.com to www.xxx.com. This would be if your IIS server wants to see https://www.yyy.com/yyy.  Header Re-Write is documented here.

Hope this helps,

Sean

Sean,

Can you elaborate on the configuration a little more please, i am attempting to do the same thing but my rewrite config matches the traffic again when it returns and so loops, you can see the hits on the redirect server are 2000ish for one web request. My class map is matching on ip and port. I can’t seem to implement a policy map that doesn’t match and ip/port.

Thanks

Chris

tvirtanen Thu, 05/19/2011 - 01:12

Hi Sean,

I read your answer that the ACE currently cannot rewrite an url on the fly.

Has anything changed since you wrote that answer? Is it implemented in new versions? Or will it be?

jsirstin Thu, 05/19/2011 - 06:14

This has not changed. The ACE including the ACE30 module does not support rewrite of the URL only the headers.

Regards

Jim

Actions

This Discussion