cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
5541
Views
5
Helpful
8
Replies

ACE URL Rewrite

isgwebb1
Level 1
Level 1

Hi Guys,

Just need to know if I'm correct but I'm trying to setup a HTTP Rewarite for a hostname. I.E if a user addressed http://test.joebloggs.com and i wanted it to redirect to http://test1.joebloggs.com can this function do that?

If so I have tried but doesn't seem to work see my action list line;

action-list type modify http PoC_APPS_HTTP_Mod

header rewrite both location header-value "http://test" replace "http://apps"

a little new to ACE so this is a POC test.

Regards

Matt

1 Accepted Solution

Accepted Solutions

Gilles Dufour
Cisco Employee
Cisco Employee

Here is the correct way to do it:

action-list type modify http RewriteHost

header rewrite request Host header-value "test(.*)" replace "apps%1"

Be aware that does not redirect the user to apps. It just forwards the request to the test server with the host field rewritten in the http header.

If you want a redirect to a different server, you need to create a redirect service which will send a 302 redirect to the client forcing a new connection to be open to apps....

Gilles.

View solution in original post

8 Replies 8

Gilles Dufour
Cisco Employee
Cisco Employee

Here is the correct way to do it:

action-list type modify http RewriteHost

header rewrite request Host header-value "test(.*)" replace "apps%1"

Be aware that does not redirect the user to apps. It just forwards the request to the test server with the host field rewritten in the http header.

If you want a redirect to a different server, you need to create a redirect service which will send a 302 redirect to the client forcing a new connection to be open to apps....

Gilles.

Hi Gilles,

I have a question concerning that matter:

How about Rewriting not just the Host part of the Request but the GET part, as well?

I tried that on the ace but failed - all I am able to rewrite is the HOST part.

Here is what I tried to do:

action-list type modify http URL_REWRITE

header rewrite request Host header-value "www(.*)" replace "www19%1"

header rewrite request GET header-value "/de/(.*)$" replace "/en/%1"

While the upper Rewrite of the HOST www to www19 worked fine, the Rewrite of the GET part did not work.

I also tried to just put the Rewrite of GET part alone inside, but did not work, either.

Hope anyone can clarify this...

Thanks and best regards,

Daniel

You can't modify the url.

If you want to do so, you have to do a redirect which will force the web browser to send the correct url.

Gilles.

Hi Gilles,

thanks for the information. is that not possible in general or is it just not implemented, yet?

do you know anything about ACE and ssl/tls server name indication (sni)? need that to be able to migrate the ssl termination from apache servers to the ace - but could not find anything about that...

thanks and best regards,

daniel

It has never been possible to change the URL with a Cisco loadbalancer.

Design decision as obviously this should be possible.

I don't think there is any plan to support the modification of the url.

We do not support SNI currently.

I'll check if there is any plan for it.

Thanks,

Gilles.

Daniel,

there is currently no plan.

I'm pushing hard to get it added because I think it is really useful.

If you could ask your Cisco contact to introduce an official request to the Product Manager, that can help move faster.

Tx.

Gilles.

Hi Gilles,

Thanks a lot for that clarification - that helps me a lot. I'll talk to the Austrian account team in case the customer insists on it.

Best regards,

Daniel

Hello, Any news on that URL Rewrite support on ACE?

I really do not understand why is missing

Bogdan

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: