cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
694
Views
0
Helpful
2
Replies

CSS Redirect

shday
Level 1
Level 1

I have a server that has multiple web instances and each web instance is using a different domain.  For example,

www.spoton.com

www.catchtheride.com

www.skipper.com

I have about 23 different domains that I need to make sure are redirected if the initial request is http.  Is there a way to create a redirect service that would redirect the host and the path without creating a redirect service for each domain.  I know in the ACE you can us the https://%h%p, but I can't seem to get this same config into the CSS.

2 Replies 2

stmccabe
Cisco Employee
Cisco Employee

Hi,

Yes you can do want you are looking to acheive on the CSS.  What you will need to do is the following:

1) create a redirect service, regular service and two content rules (redirect rule and ssl rule) for each domain you want to catch:

service redirect1 
  type redirect 
  protocol tcp 
  port 80 
  keepalive type none 
  domain "https://domain1.test.net" 
  active 
service siteyouwanttoredirectallto443
  ip address 4.4.4.4
  protocol tcp
  port 80
  active
content domain1.test.net-redir 
    vip address 10.1.1.100 
    protocol tcp 
    port 80 
    url "//domain1.test.net/*" 
    add service redirect1 
    active 
content domain1.test.net-SSL 
    vip address 10.1.1.100 
    protocol tcp 
    port 443
    add service siteyouwanttoredirectallto443
    active

So I have to build a serperate redirect service and content rule for each domain I need to redirect?  There is no way to tell the CSS to just reidrect whatever domain and path is in the request.  I want to build one redirect service based on host and path.  One content rule for port 80 pointing to the redirect service.  This redirect is only to force all request to 443 instead of 80 for whatever the user puts in for the url.

Is this possible.

service redirect1 
  type redirect
  protocol tcp
  port 80
  keepalive type none
  domain "https://%h/%p
  active

content domain1.test.net-redir
    vip address 10.1.1.100
    protocol tcp
    port 80
    url "/*"
    add service redirect1
    active

Review Cisco Networking for a $25 gift card