在文档根服务器上的任何CSS,JS,HTML,PHP和TPL文件上用相对url //替换http

from command line or PHP, no matter what.

How to replace all the "http://example.com" strings with "//example.com" (relative protocol URL) on any CSS, JS, HTML, PHP and TPL file on a CentOS server? Possible by command line directly? THANK YOU :-)

Netbeans is one option.

Navigate to whatever folder you want to modify the pages in in the file explorer.

Hit CTRL+H

In the search box type "http" leave the replace box empty. Repeat with "https".

It will search and I believe it asks to confirm before changing your files. Idr.