CSS - URL rewrite question

Answered Question
Apr 26th, 2007

Hello,

Is it possible to perform a URL rewrite with the CSS 11506? We are migrating user apps from our old environment into a new one and need to redirect the users to the new environment as apps are migrated. Both environments will be up and available for the duration of the app migration. What we would like to do is when a user types https://abc.123.xyz.com/appname that they are redirected to https://abc.123.com/appname (dropping the .123 from the URL) and rewriting the new URL in the users browser. Also, we need to continue to load balance this user traffic in both environments.

Is this possible? If so, please direct to some supporting documentation. We are running WebNS version sg0750105s on a 11506.

Thanks!

-Adam

I have this problem too.
0 votes
Correct Answer by Gilles Dufour about 9 years 7 months ago

The CSS does not do url-rewrite.

All we can do is generate an HTTP redirect [as shown in Syed example] forcing the client to open a new connection to the new location.

If the destination ip in the redirect is the vip itself, the client will reopen a connection with the CSS again. You can then catch this traffic in a different content rule and perform loadbalancing.

ie: if you want to catch the default url "/" and redirect to "/new-site" you would create a redirect rule catching url "/" and a 2nd rule catching "/new-site/*" and loadbalance with the servers.

Gilles.

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 5 (1 ratings)
Loading.
Syed Iftekhar Ahmed Thu, 04/26/2007 - 12:11

Try this

content redirect

port 80

protocol TCP

vip address x.x.x.x

URL "/*"

redirect "//abc.123.com/appname"

active

the redirect command is used to set HTTP status code 302 (object moved) for a

content rule and specify the alternate location of the content governed by a rule.

Syed

a.veschak Thu, 04/26/2007 - 14:10

Syed,

Thanks for the reply. However, I need to perform this URL rewrite for each app as we migrate into the new environment... and each app has it's own content rule which is balanced across multiple services.

Seems as if I can either do the rewrite or load balance... but not both at the same time. Is this correct?

Thanks again,

-Adam

Correct Answer
Gilles Dufour Thu, 04/26/2007 - 23:35

The CSS does not do url-rewrite.

All we can do is generate an HTTP redirect [as shown in Syed example] forcing the client to open a new connection to the new location.

If the destination ip in the redirect is the vip itself, the client will reopen a connection with the CSS again. You can then catch this traffic in a different content rule and perform loadbalancing.

ie: if you want to catch the default url "/" and redirect to "/new-site" you would create a redirect rule catching url "/" and a 2nd rule catching "/new-site/*" and loadbalance with the servers.

Gilles.

Actions

This Discussion