Networking

Redirect HTTP to HTTPS – Citrix Netscaler

This will redirect all HTTP traffic to a virtual host to your HTTPS responder. It will save you having to handle it within the webserver.

1. Create a virtual server configuration, call it something like SERVICE HTTPtoHTTPS Redirect listening on port 80

2. Create a placeholder service with a bogus IP, like 169.254.0.1 – disable health monitoring

3. Create a Responder policy, call it HTTPSRedirect with the Expression of True

4. Create a Responder action, call it HTTPSRedirect. Attach it to the Responder policy, and set the target of the action to be:

https://”+HTTP.REQ.HOSTNAME+HTTP.REQ.URL

Just as a backup, I like to add in the Redirect URL of the Virtual Server config to redirect to the https URL of your destination. This covers you if the placeholder service failed for whatever reason.

Remember to configure your placeholder service to not have the default low limitations on concurrent connections/requests otherwise it’ll throttle your redirects.

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s