cancel
Showing results for 
Search instead for 
Did you mean: 

How to replace all media's Protocol Rewriting from http:// & https:// to just "//"?

How to replace all media's Protocol Rewriting from http:// & https:// to just "//"?

Our site is using cloudflare cdn. Protocol rewriting is most beneficial to websites that use Cloudflare Flexible SSL. When using Flexible SSL, your origin server receives the connection over "http". The source code that is returned will then link to all assets using "http://" at the start of the link. The browser sees the page as loaded over "https" though, so it will block all of these "insecure assets". (This is commonly referred to as a "mixed content warning") By rewriting all the links to start with just "//", the browser will try to load all the assets over the same protocol as the main page ("https" if using Flexible SSL), CloudFlare will connect to your origin over http to get the asset, and the "mixed content warning" will disappear. More: https://support.cloudflare.com/hc/en-us/articles/203652674 How to do this?