cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2870
Views
0
Helpful
1
Replies

ACE http header rewrite

antero
Level 1
Level 1

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

1 Reply 1

Daniel Arrondo Ostiz
Cisco Employee
Cisco Employee

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

Review Cisco Networking for a $25 gift card