11-01-2008 06:03 AM
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
Solved! Go to Solution.
11-04-2008 05:47 AM
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.
11-04-2008 05:47 AM
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.
02-03-2009 01:15 AM
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
02-03-2009 01:57 AM
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.
02-03-2009 02:07 AM
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
02-03-2009 05:32 AM
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.
02-04-2009 05:43 AM
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.
02-04-2009 05:54 AM
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
11-09-2010 08:22 AM
Hello, Any news on that URL Rewrite support on ACE?
I really do not understand why is missing
Bogdan
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide