Jump to content
Welcome to our new Citrix community!

301 to redirect from one URL to another

Recommended Posts

1) be sure your tercume.asan.az and tercumee.asan.gov.az fqdns both resolve to the correct VIP for you lb vserver.

2) Create a lb vserver on VIP1:HTTP:80 to receive http:80 traffic to redirect to https:443

3) dependending on whther you need to redirect just the URL "/" or any path and query elements you can change the policy:

add service svc_alwaysup http 80 -healthmon disabled

add lb vserver lb_vsrv_tercume_http_sendtossl http <VIP1> 80

bind lb vserver lb_vsrv_tercume_http_sendtossl svc_alwaysup


add responder action rs_act_sendto_gov.az redirect '"https://tercume.asan.gov.az" + http.req.url.path_and_query' -responseStatusCode 301

add responder policy rs_pol_sendto_gov.az 'http.req.header("host").set_text_mode(ignorecase).eq("tercume.asan.az")' rs_act_sendto_gov.az


bind lb vserver lb_vsrv_tercume_http_sendtossl -policyName rs_pol_sendto_gov.az -priority 100


There are other variations of this depending on exact needs, but this would send all http://tercume.asan.az<stuff> to https://tercume.asan.gov.az<stuff>

If you also need to ensure that http://tercume.asan.gov.az is also redirected to https, I would tweak the expression more.






Link to comment
Share on other sites

Hello Sir,


Thanks for your answer. I want to ask that, is  VIP1 just a name or IP ?

I have already done 1st and 2nd point. For the 3rd point I want to redirect URL.

In this URL I don`t understand what is   What is the meaning of this ? Please can you explain me ? 

add service svc_alwaysup http 80 -healthmon disabled   


Thanks in advance for your attention


Link to comment
Share on other sites

<VIP> refers to the actual virtual ip address... I just didn't want to make one up so I used a place holder. VIPs are IPs assigned to the vserver and are IPs owned by the ADC (it receives traffic on them.)


the service svc_alwaysup is a dummy destination which needs to be always up. A policy hit only works if the vserver is in an UP state.  So the svc_alwaysup points to a fake ip destination (any ip you choose) so it won't actually pass traffic and is set up to be unmonitored which makes it always up.

There are other ways to do this without a policy as well...


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