How to redirect request to different Hostname using Responder Feature of NetScaler

How to redirect request to different Hostname using Responder Feature of NetScaler

book

Article ID: CTX218368

calendar_today

Updated On:

Description

The objective of the article is to make use of NetScaler Responder Feature to redirect the request from 1 hostname to a different hostname.

Example: The domain for a company has moved from example_old.com to example_new.com

Now, even if the users access website.example_old.com, the request should be automatically redirected to website.example_new.com


Instructions

1. Enable the NetScaler Feature Responder

CLI,
enable ns feature RESPONDER
GUI,
System > Settings > Configure Advanced Features

Screenshot :
image.png


2. Create a Responder Action with type as Redirect

Set the Redirect Path as defined in the expression below

CLI,
add responder action Redirect_action redirect "\"http://website.example_new.com\""

GUI,
AppExpert > Responder > Action > Add

Screenshot :
image.png

3. Create the Responder Policy that will be intercepted by the NetScaler and will then redirect the user request

CLI,
add responder policy Redirect_Policy "http.REQ.HOSTNAME.EQ(\"website.example_old.com\")" Redirect_action

GUI,
AppExpert > Responder > Policy > Add

Screenshot :
image.png

4. Bind the Responder Policy to the virtual server

CLI,
bind lb vserver http -policyName Redirect_Policy -priority 100 -gotoPriorityExpression END -type REQUEST

GUI ,
Traffic Management > Virtual Servers > LB Vservers > Policies > Bind "Redirect_Policy"

Screenshot :
image.png