cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
8270
Views
0
Helpful
4
Replies

ACE Redirect

aanelso1
Level 1
Level 1

With the ACE module or appliance can somebody point me to the best method for redirecting a url to a new url, removing a directory structure. It should look something like this and would be a permanent move (http 301):

Old url: http://oldsite.company.net/foldername/filename.ext

Redirect: http://newsite.company.net/filename.ext

Thanks in advance for any and all replies.

4 Replies 4

rvavale
Cisco Employee
Cisco Employee

Hi,

For ACE to redirect, you need to configure serverfarm and rserver of type redirect.

With below config, for request hitting VIP and has "/foldername/filename\.ext" , ACE will sent 301 Redirect url as
"http://newsite.company.net/filename.ext"

--------------------------------------------------------------------------------------------

class-map type http loadbalance match-any redirect-l7
  2 match http url /foldername/filename\.ext.*

policy-map type loadbalance first-match redirect-policy
  class redirect-l7
    serverfarm redirect-sf

serverfarm redirect redirect-sf
  rserver redirect-sf
    inservice

rserver redirect redirect-sf
  webhost-redirection http://newsite.company.net/filename.ext 301
  inservice

--------------------------------------------------------------------------------------------


This link explains more on Configuring Real Server Relocation String,
http://www.cisco.com/en/US/docs/interfaces_modules/services_modules/ace/v3.00_A2/configuration/slb/guide/rsfarms.html#wp1013201


Hope this helps,

Best Regards,
Rahul

The reply works, but not like our requirements need.

What we need is to preserve the filename (as it will not change in the redirect string), but drop the directory name. We have about 900 video files that were set up on 20 different channels. These video names will not change, however, the channels are going away.

So, back to my initial question....

I know that %h = host name and %p equals the uri for the web-host redirection string. But there is not a variable for just the file name as far as I know.

There may be a way to rewrite the header, but I am fairly new to the ACE (currently working on replacing all of our existing CSSs and CSMs with ACEs).

I think that the class-map for matching the inbound request is correct....it is just the web-host redirection string that I want to minimize.

If I have to have a class-map match and unique web-host redirection for all 900 files, that will be huge, not to mention the resources that could be consumed by querying all of those matches.

Thanks for your quick reply.

Hi,

Thats correct, at the moment there isn't a variable to match on specific path in the URL. "%p" matches on entire path string after the first "/".

So configuring "%p" won't help as it will include entire path.

On ACE you can configure Action-list to rewrite header in Server response. However it won't be possible for ACE to rewrite header for 301 response generated by its own "redirect rserver".

Maybe you might want to do initial redirect on Server and then configure ACE to Rewrite Location Header before forwarding it to Client.

So if Real Server replies with 301 Response "Location: http://newsite.company.net/foldername/filename.ext" then ACE can rewrite this header to

"Location: http://newsite.company.net/filename.ext" .

Hope this helps.

Best Regards,

Rahul

Thanks again for your reply.

I was able to accomplish what we are looking for using Microsoft IIS server. Their redirect has multiple variables, including $S which represents the filename only.

Thanks again.

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: