NetScaler HTTP-to-HTTPS Redirect Configuration Example

Here an easy quick example how to redirect HTTP to HTTPS, you can also do the redirect within the virtual server but then the virtual server is shown as down.

The following example is a nicer way to implement the redirect.

add responder action responder-HTTP-HTTPS redirect "\"https://\"+http.REQ.HEADER(\"Host\").HTTP_HEADER_SAFE+http.REQ.URL.PATH_AND_QUERY.HTTP_URL_SAFE"
add responder policy responder-POLICY-EXCHANGE "http.REQ.HOSTNAME.EQ(\"owa.domain.com\") && client.TCP.DSTPORT.EQ(80)" responder-HTTP-HTTPS
set responder param -undefAction NOOP

add serviceGroup service-EXCHANGE-OWA_80 HTTP -maxClient 0 -maxReq 0 -cip DISABLED -usip YES -useproxyport YES -cltTimeout 180 -svrTimeout 360 -CKA NO -TCPB NO -CMP YES -appflowLog DISABLED
bind serviceGroup service-EXCHANGE-OWA_80 EXCHANGE-CAS01 80 -CustomServerID "\"None\""
add lb vserver vserver-EXCHANGE-OWA_80 HTTP 192.168.0.1 80 -persistenceType NONE -cltTimeout 180
bind lb vserver vserver-EXCHANGE-OWA_80 service-EXCHANGE-OWA_80
bind lb vserver vserver-EXCHANGE-OWA_80 -policyName responder-POLICY-EXCHANGE -priority 100 -gotoPriorityExpression END -type REQUEST

Redirect Cisco show commands

Short overview of how to redirect Cisco show commands… quite useful sometimes 😉

show <command> | redirect URL

The syntax to redirect the command output to the file location specified in the URL. The pipe (|) is required. Prefixes can be local file locations, like flash: or disk0:. Alternatively, you can specify network locations using the following:

ftp://username:password@location/directory/filename
tftp://location/directory/filename

Rcp: prefix is not supported.

Example: Redirect show tech-support

show tech-support | redirect tftp://10.1.1.100/show-tech_c2960s-01.txt