Jump to content
Welcome to our new Citrix community!

HELP - Content Switching - URL

Recommended Posts


I am having trouble accessing a webpage using content switching. I'm not sure if I have gone about it the correct way or if I am missing something. Here is my LB-CS configuration:


Load Balance Server - wh-psfcgwebext -

VIP - VS_Ww3 - with a service group binded to it and server cert.


Content switch virtual server - CS_vSERVER-Ww3 - using port 443.

Content Switching Policy - HTTP.REQ.HOSTNAME.SET_TEXT_MODE(IGNORECASE).CONTAINS("ww3.frederickcountymd.gov ")


I am told that when accessing http or https://ww3.frederickcountymd.gov/ the page/url should display http/https://psfcgext/ as below





Link to comment
Share on other sites

So, first is to make sure content switch works and then if responder or rewrite is needed.


If you want users to connect to one FQDN (ww3.fredricks...), and get to a specific lb vserver behind it, then your cs policy is sorting based on hostname and you possibly have multipel fQDNs resolving to the same VIP.


The client to cs vserver is using hostname ww3.fredricks...  .  And then the CS directs traffic to the lb vserver which directs traffic to teh service behind it.

There is no hostname change client side in this flow.


If you want users to use one FQDN and then change the FQDN the user sees client side, then you need a responder policy that will take request 1 (fqdn1) and redirect to request2 (fqdn2). And then the users will see and connect to the NEW fqdn.

So the question is are you trying to change FQDN's the user sees client side and need a redirect to a new destination. And if so, do you still need content switching at all.

Or do you need to combine a responder policy to redirect from one name to another in addition to content switching.


But it looks like you are trying to get cs to do your fqdn change; which it won't do on its own.  If you want the name to go to a specific set of lb vservers (and the user doesn't see the hostname change), then cs only. If the hostname is changing, then you need a responder policy but where the new request ends up this cs vserver or a different lb vserver would need more information.




Link to comment
Share on other sites

It probably means you need a cs policy for when the FQDN1 is in use to send to lbvserver for psfc AND a cs policy for when the fqdn changes to PSFCgext to also go to this lb vserver; otherwise the cs vserver is seeing unmatched traffic and its not being directed to the backend.


So change your policy for if http.req.header("host").set_text_mode(ignorecase).eq("ww3.frederickcountymd.gov") || http.req.header("host".set_text_mode(ignorecase).eq("psfcgext")

So both scenarios are caught and sent to the proper lb vserver (assuming same destination).



Link to comment
Share on other sites

I removed my current CS policy - HTTP.REQ.HOSTNAME.SET_TEXT_MODE(IGNORECASE).CONTAINS("ww3.frederickcountymd.gov ").


When trying to add the new policy - http.req.header("host").set_text_mode(ignorecase).eq("ww3.frederickcountymd.gov") || http.req.header("host".set_text_mode(ignorecase).eq("psfcgext")


It errors - Expression syntax error [er("host".^set_text_m, Offset 108]. Is there something I am forgetting? LB and CS is pretty new to me...

Link to comment
Share on other sites

Ok I got the policy added in on the CS - http.req.header("host").set_text_mode(ignorecase).eq("ww3.frederickcountymd.gov") ||http.req.header("host").set_text_mode(ignorecase).eq("psfcgext")


However, when going to ww3.frederickcountymd.gov - it doesn't redirect-display https://psfcgext/


This is the only policy I have on CS.


Does it need to be added to the LB VIP as well or a specific policy? 



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...