HTTP to HTTPS Redirect on Cisco ACE

Instead of always having to write an HTTPS redirect on your webservers, you can have the ACE handle this work for you.

The first step is to create your redirection “rservers”. In my example it matches everything. If you want to only redirect a specific URL, then change the content after “https” to match what you want.

rserver redirect HTTPS-REDIRECT
  webhost-redirection https://%h%p 302

Add to a redirect serverfarm:

serverfarm redirect FARM-HTTPS-REDIRECT

Once you have the serverfarm configured, apply to the respective policy-map. To match everything apply it to a class-default, if you want to redirect a specific URL assign it against a policy-map with multiple class definitions.

policy-map type loadbalance first-match POLICY-HTTPSREDIR
  class class-default
     serverfarm FARM-HTTPS-REDIRECT

Apply the policy map to your multi-match policy.

policy-map multi-match POLICY-STG1
   loadbalance vip inservice
   loadbalance policy POLICY-HTTPSREDIR
   loadbalance vip icmp-reply
 class SNAT
   nat dynamic 1 vlan 100

Add that to your interface and you’ll be good to go.

HTTP to HTTPS Redirect on Cisco ACE

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s