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. If you'd prefer to explore, try our test area to get started. And see here for current known issues.

New Member

ACE http header rewrite

hi

is there any chance to change my requeste on ace like this?

the request is http://www.xpto.com and i need to be rewrite to http://xpto.com

thanks in advance

Antero

Everyone's tags (3)
1 REPLY
Cisco Employee

ACE http header rewrite

Hi Antero,

Yes, this is possible. Just check the link below for more details

http://www.cisco.com/en/US/docs/interfaces_modules/services_modules/ace/vA2_3_0/configuration/slb/guide/classlb.html#wp1151822

Assuming "http://www.xpto.com" is the only request you want to rewrite, the syntax of the action would be "header rewrite request Host header-value www.xpto.com replace xpto.com"

If, however, you need to create this action in a more generic way so that any URL is rewritten in the same format, you would need to use a regular expression. In this case, it would be something similar to the following (I didn't test it, so I'm not 100% sure that the regex is correct) "header rewrite request Host header-value www\.(.*)\.com replace %1.com"

I hope this helps

Daniel

2330
Views
0
Helpful
1
Replies