Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. And see here for current known issues.

New Member

CSS - URL rewrite question

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

1 ACCEPTED SOLUTION

Accepted Solutions
Cisco Employee

Re: CSS - URL rewrite question

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.

4 REPLIES

Re: CSS - URL rewrite question

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

New Member

Re: CSS - URL rewrite question

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

Cisco Employee

Re: CSS - URL rewrite question

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.

New Member

Re: CSS - URL rewrite question

Thanks, Giles! That's what I was looking for.

Regards,

-Adam

300
Views
0
Helpful
4
Replies
CreatePlease login to create content