How to redirect HTTP request to HTTPS using responder

CLI Reference;

enable ns feature responder
add responder action http_to_https_actn redirect "\"https://\" + http.req.hostname.HTTP_URL_SAFE + http.REQ.URL.PATH_AND_QUERY.HTTP_URL_SAFE"
add responder policy http_to_https_pol HTTP.REQ.IS_VALID http_to_https_actn RESET
add lb monitor localhost_ping PING -LRTM ENABLED -destIP
add service Always_UP_service HTTP 80 -gslb NONE -maxClient 0 -maxReq 0 -cip ENABLED dummy -usip NO -sp OFF -cltTimeout 180 -svrTimeout 360 -CKA NO -TCPB NO -CMP YES
bind lb monitor localhost_ping Always_UP_service
add lb vserver HTTP 80 -persistenceType COOKIEINSERT -timeout 0 -cltTimeout 180
bind lb vserver Always_UP_service
bind lb vserver -policyName http_to_https_pol -priority 1 -gotoPriorityExpression END
Author: mrterdl

Leave a Reply

Your email address will not be published. Required fields are marked *