Search:     Advanced search
Browse by category:
Glossary | Ask question



How to configure HTTP to HTTPS rewrite on HTTP Response Body Content?
Add comment
Views: 422
Votes: 0
Comments: 0

There are few situations where customer application is hardcoded their application with protocol HTTP in the URL. This content is not available in the HTTP Response body and that needs to be rewrite to HTTPS.

Here is the configuration for the same.

Note: This is applicable only for the rewriting the content in the HTTP response body.

Instructions

Below is the config template to rewrite “HTTP” to “HTTPS” which is there in the body.

 Note: following policies are created globally. If you don’t want this rewrite to applicable for few of the virtual services then you can disable the rewrite body on those Virtual Service .

 #http rewrite body on

#http rewrite body on "Virtual_Service_Name"  ----- > Please turn it off on the VS on which you don’t want body rewrite.

 Make sure to enable only mime types on which you would like to have a rewrite.

 #http rewrite body mimetype html

#http rewrite body mimetype plain

#http rewrite body mimetype richtext

#http rewrite body mimetype xml

#http rewrite body mimetype xhtml

#http rewrite body mimetype css

#http rewrite body mimetype js

#http rewrite body statuscode 200 ----- > This rewrite works only for the content which has a HTTP response code as 200. if Server is giving the other response code, you can either add it or change it server response code.

#http rewrite body rule "Substitute s/http:/https:/" "-Ri" "" ----- > Here you can use the strings whichever you wanted to rewrite. In this particular example, we are replacing “HTTP:” to “HTTPS:” in the content received from Real Server on the http body and has a Response Status code as 200.



Other questions in this category
SLB Method with Round Robin (rr)
SLB Method with Least Connections (lc)
SLB Method with Shortest Response Time (sr)
SLB Method with Persistent IP (pi)
SLB Method with Hash IP (hi)
SLB Method with Consistent Hash IP (chi)
SLB Method with Persistent Hostname (ph)
SLB Method with Persistent URL (pu)
SLB Method with Persistent Cookie (pc)
SLB Method with Insert Cookie (ic)
SLB Method with Rewrite Cookie (rc)
SLB Method with Embed Cookie (ec)
SLB Method with Hash Cookie (hc)
SLB Method with Hash Header (hh)
SLB Method with Consistent Hash Header (chh)
SLB Method with Persistent SSL SID (sslsid)
SLB Method with SNMP (snmp)
SLB Method with SIP CallID (sipcid)
SLB Method with SIP UserID (sipuid)
SLB Method with Filetype Policy (filetype) ???
SLB Method with Redirect Policy (redirect)
SLB Method with Regular Expression Policy (regex)
SLB Method with Static Policy (static)
SLB Method with QoS Clientport Policy (clientport)
SLB Method with QoS Cookie Policy (cookie)
SLB Method with QoS Hostname Policy (hostname)
SLB Method with QoS Network Policy (network)
SLB Method with OoS URL Policy (url)
SLB Method for Hash URL (hashurl) ???
SLB Backup Policy
Configure SLB for Exchange with OWA and Native Protocol