Jump to content
Welcome to our new Citrix community!

CSVS policy for www


Recommended Posts

Hello!

I have a CSVS policy wich redirect site to LBVS
policy regular expression is:
HTTP.REQ.HOSTNAME.SET_TEXT_MODE(IGNORECASE).EQ("sitename.com")

 

Wich syntax I need to redirect url with prefix www?

HTTP.REQ.HOSTNAME.SET_TEXT_MODE(IGNORECASE).EQ("www.sitename.com")  doesn't work

Or maybe there is any solutions with rewriting www.sitename.com to https://sitename.com?

Thank's all for answers.

Link to comment
Share on other sites

Content switching doesn't redirect traffic. Traffic arrives at CS vserver and based on policy hit and is sent (inside adc) to the lb tier.

 

If you have a user that needs to go from an original request www.sitename.com to sitename.com, and you need the user to make the change in their request, you need to use a RESPONDER policy to redirect from old thing to new thing.  User will get a response to the first request with a redirect to the new request and then the client will make a connection using the new name.

 

Create a responder redriect action, with the redirect you want (if you need to preserve the path&query):

Responder Action: rs_act_sendto_sitename

Redirect (action type)

Expression:  Adjust for http:// or https://

"http://sitename.com" + http.req.url.path_and_query

 

Responder Policy: rs_pol_sendto_sitename

References responder action: rs_act_sendto_sitename

Expression:

http.req.header("host").set_text_mode(ignorecase).eq("www.sitename.com")

 

  • Like 1
Link to comment
Share on other sites

meant to add this yesterday...

If instead of redirect, you still want a cs policy to send traffic to the lb tier based on the user's client side request but present a different host name (by the adc) to the backend server, then you might need a rewrite policy.

 

If you clarify the scenario, if you want the client to see the change and make a new request with new host OR if you want to change the host in the request between the ADC and the server, we can give you a more specific answer.

 

 

 

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...