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

ACE HTTP Header Rewrite

Hi,

i need help in configuring http header rewrite. i want to take request url: www.cisco.com and rewrite it to www.yahoo.com for example.

what should be the syntax at the action list i am configuring ?

appreciate your help,

Avi.

1 REPLY
Cisco Employee

Re: ACE HTTP Header Rewrite

You can't actually rewrite the url portion of the uri, but in your example you are actually looking to rewrite the host header which the ace can do. Here is how you do it:

1. make a parameter map to tell the ace to look at each request for rewrite eligibility:

parameter-map type http rewrite
  header modify per-request

2. Make an action list to do the modification

action-list type modify http host_rewrite
  header rewrite request Host header-value "www.cisco.com" replace "www.yahoo.com"

3. apply the action list to the load balance policy:

policy-map type loadbalance first-match test4
  class class-default
    serverfarm test4
    action host_rewrite

4. call the load balance policy and parameter map in your L4 policy map for the vip class.

policy-map multi-match test5
  class test1
    loadbalance vip inservice
    loadbalance policy test4
    loadbalance vip icmp-reply active
    appl-parameter http advanced-options rewrite

1236
Views
4
Helpful
1
Replies