cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1011
Views
0
Helpful
3
Replies

ACE: URL redirect - not working

gavin han
Level 1
Level 1

Hi,

I've to do url redirection from port 80 to port 443. I've following configured:

rserver redirect url.test.com-rd

  webhost-redirection https://url.test.com/

  inservice

serverfarm redirect url.test.com:80

  description url.test.com - port 80 redirect ***

  rserver url.test.com-rd

    inservice

class-map match-any url.test.com:80

  2 match virtual-address 192.168.1. tcp eq www

policy-map type loadbalance first-match url.test.com:80

  class class-default

    serverfarm url.test.com:80

  policy-map multi-match LOAD_BALANCE

   class url.test.com:80

    loadbalance vip inservice

    loadbalance policy url.test.com:80

    loadbalance vip icmp-reply active

===

with above configuration, ACE is redirection port 80 to port 443 but it also rewrites the header.  i.e. ACE send me to

"https://url.test.com/" if I type "http://url.test.com/abc" in the browser. It should have redirected to  "https://url.test.com/abc" ( it shouldn't have removed "/abc")

could you advice how to accomplish it.

Thanks in advance...

3 Replies 3

pablo.nxh
Level 3
Level 3

Hi Gavin,

You must add "%p" after the forward slash, like this:

rserver redirect url.test.com-rd

  webhost-redirection https://url.test.com/%p

  inservice

That shoould do it

HTH

__ __

Pablo

Hi,

thanks pablo. but that isn't expected response. redirected url shows the load balanced server. i.e. for the following serverfarm of port 443:

serverfarm host url.test.com:443

  description url.test.com - Port 7777 ***

  failaction purge

  probe url.test.com:7777

  rserver server1.test.com 7777

    inservice

redirected url comes as "http://server1.test.com:7777/abc/" ...instead of what I expect .i.e. i expect "

https://url.test.com/abc/"

"

Hi Gavin,

In this case your backend servers have configured this redirection in the HTTP server itself i.e apache, IIS, etc...

I don't know all the details behind your site but you need to decide whether this is required (you may implement URL rewrite on response for that host header) or you can just remove it and let the ACE do all the redirection job.

HTH

__ __

Pablo

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: