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

URL redirection in VIP to URL with same VIP

Hello,

I configure ace module with VIP 172.10.254.3 (http://xyz.intranet.net), but when i access to http://xyz.intranet.net want to redirection to http://xyz.intranet.net/faces/login?.jspx is it posible? How i can configure that?

To continue i show the configuration of ace module

access-list anyone line 8 extended permit ip any any


probe http http-get-index
  interval 4
  faildetect 2
  passdetect interval 10
  receive 2
  expect status 200 200
  open 2
rserver host intra1
  ip address 10.200.254.3
  inservice
rserver host intra2
  ip address 10.200.254.4
  inservice
serverfarm host intrafarm
  rserver intra1
    probe http-get-index
    inservice
  rserver intra2
    probe http-get-index
    inservice

sticky ip-netmask 255.255.255.255 address source src-ip-sticky
  timeout 30
  serverfarm intrafarm

class-map type management match-any Mgt
  2 match protocol http any
  3 match protocol telnet any
  4 match protocol ssh any
  5 match protocol icmp any
class-map match-any VIP-srvintranet
  2 match virtual-address 172.10.254.3 any

policy-map type management first-match Management
  class Mgt
    permit

policy-map type loadbalance first-match L7-HTTP
  class class-default
    serverfarm intrafarm

policy-map multi-match client-vips
  class VIP-srvintranet
    loadbalance vip inservice
    loadbalance policy L7-HTTP
    loadbalance vip icmp-reply

interface vlan 501
  description SIDE-SERVERS
  ip address 10.200.254.1 255.255.255.248
  access-group input anyone
  access-group output anyone
  service-policy input Management
  no shutdown
interface vlan 502
  description SIDE-CLIENTS
  ip address 172.10.254.2 255.255.255.248
  access-group input anyone
  access-group output anyone
  service-policy input Management
  service-policy input client-vips
  no shutdown

ip route 0.0.0.0 0.0.0.0 172.10.254.1

1 Reply 1

yushimaz
Cisco Employee
Cisco Employee

Probably, you can do with redirect config such as the following.

rserver redirect redirect-server1

  webhost-redirection http://xyz.intranet.net/faces/login?.jspx

!___ You have to issue [ctrl+v] and then ? to configure "?" on cli.

  inservice

serverfarm redirect redirect-sfarm1

  rserver redirect-server1

    inservice

class-map type http loadbalance match-any url

  2 match http url /

class-map type http loadbalance match-all xyz.intranet.net

  2 match http header Host header-value "xyz.intranet.net"

  3 match class-map url

policy-map type loadbalance http first-match L7-HTTP

  class xyz.intranet.net

    serverfarm redirect-sfarm1

ACE will check host header-value and url.

If host header value is "xyz.intranet.net" and url is "/", ACE

will reply 302 redirect to client.

If not, the request will hit class-default.

VIP address in my lab was 192.168.71.101(xyz.intranet.net)

and the result was below.

sv771-1:/# telnet xyz.intranet.net 80

Trying 192.168.71.101...

Connected to xyz.intranet.net.

Escape character is '^]'.

GET / HTTP/1.1

Host:xyz.intranet.net

HTTP/1.1 302 Found

Connection: close

Location: http://xyz.intranet.net/faces/login?.jspx

Connection closed by foreign host.

sv771-1:/#

Regards,

Yuji

Review Cisco Networking for a $25 gift card