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

URL redirection by using Cisco CSS LB

Hi ,

 

Can we redirect the URL which client from outside type to the original domain URL.

 

Let me explain (as there are 10 url are working on two server which is under two content port 80, and 443)

User sitting outside type the url like :- http://abc.com?xyz=1

this url should be redirect to https://abc.com

 

Thanks

 

7 REPLIES
Cisco Employee

Hi,Here is the redirect

Hi,

Here is the redirect config link:

http://www.cisco.com/c/en/us/support/docs/application-networking-services/css-11000-series-content-services-switches/41840-redirects-config.html

there are different ways to configure redirect on the CSS.

Here is a link explaining all of them

http://www.cisco.com/en/US/products/hw/contnetw/ps789/products_configuration_example09186a00801de8d6.shtml

You need to make use of the command 'domain' in order t o preserve the path.

HTH

Inayath

*plz rate all usefull posts.

New Member

Hi Inayath, Thanks for your

Hi Inayath,

 

Thanks for your email.

  content Bapu-443
    add service 192.168.202.148-web1-451
    vip address 192.168.202.202
    port 443
    protocol tcp
    no persistent
    balance leastconn
    advanced-balance sticky-srcip
    active
    
  content Babu-80
    advanced-balance sticky-srcip
    add service 192.168.202.148-cu-81
    add service 192.168.202.149-cu-81
    vip address 192.168.202.202
    port 80
    protocol tcp
    url "/*"
    no persistent
    balance leastconn
    active

 

As i have tried to configure DQL as well as the Redirect string for URL redirection from http://abc.com?xym=1 to https://abc.com

 

however not got succeeded

If possible please suggest the configurations.

 

Thanks

Cisco Employee

Hi,For configuring

Hi,

For configuring redirection, you need to configure a service which doesn't exist in your network and you need to add that service as type "redirect" and define the domain/redirect-string to which the clients would be redirected. The above configuration you have pasted is for loadbalancing and not redirection.

************************** SERVICE ************************** 

service Redirect
     ip address 2.2.2.2
     keepalive type none--->Keep it none to make the service active.
     type redirect
     no prepend-http--->This needs to be added if redirection is from http to https.
     redirect-string https://abc.com
     active

*************************** OWNER ***************************
    owner Redirect-test
     content Redirect-Rule
      port 80
      protocol TCP
      vip address 206.25.90.84
      add service Redirect
      URL "/*"
      active

The VIP address must be equivalent to the IP address that the user will come on. In your case it would be http://abc.com.

Regards,

Kanwal

Note: Please mark answers if they helpful.

 

New Member

Hi Kanwal,  Thanks for your

Hi Kanwal,

 

 Thanks for your suggestion.

 

Let me try this and see...

 

Moreover would like to ask you that; should i create new service for redirect and give the ip address same as its given to service 192.168.202.148-cu-81 and then add this service to the content..........   content Babu-80.

Cisco Employee

Hi,No. You need to create a

Hi,

No. You need to create a service for redirect and use an IP which doesn't exist. The CSS itself redirects the request. Use keepalive none so that service stays up.

Regards,

Kanwal

Note: Please mark answers if  they are helpful.

New Member

Hi Kanwal,  I have tried as

Hi Kanwal,

 

 I have tried as per your suggestion; unfortunately dint work.

as i have created a new service called Redirect and then assign that service under the existing Content. as follow.

 

service Redirect
     ip address 2.2.2.2
     keepalive type none
     type redirect
     no prepend-http
     redirect-string https://abc.com
     active

 

  content Babu-80
    advanced-balance sticky-srcip
    add service 192.168.202.148-cu-81
    add service 192.168.202.149-cu-81

    add service  Redirect
    vip address 192.168.202.202
    port 80
    protocol tcp
    url "/*"
    no persistent
    balance leastconn
    active

 

Could you please tell me, whether am missing something

Thanks

Gajendra

 

Cisco Employee

Hi Gajendra,You need to

Hi Gajendra,

You need to create another content rule under the owner. Adding under the same content rule is not correct. Something like the below example.

!************************** SERVICE **************************
service Redirect
  ip address 2.2.2.2
  keepalive type none
  type redirect
  no prepend-http
  Redirect-string https://www.cisco.com
  active

service regular-server1
  ip address 10.2.3.4  
  active  

service regular-server2  
  ip address 10.2.3.5  
  active  

!*************************** OWNER ***************************

owner CSS-Team

  content Redirect
    vip address 206.25.90.84
    protocol tcp
    port 80
    url "/*"
    add service Redirect
    active

  content ssl-rule
    vip address 206.25.90.84
    protocol tcp
    port 443
    add service regular-server1
    add service regular-server2
    active

Let me know if you have any questions.

Regards,

Kanwal

Note: Please mark answers if they are helpful.

 

92
Views
0
Helpful
7
Replies
CreatePlease to create content