Since the upgrade of zhp1.5, we have been using the most secure HTTPS access, but we also encountered many problems during this period, such as the previous blog pictures, because this site uses the Seven Bull Cloud storage, and all the pictures are in the form of http, but this problem will lead to unsafe factors in the web page display website.
On the way home from work last night, I suddenly remembered whether MySQL could execute SQL statements to achieve batch replacement. I asked the group at work this morning , The blogger Xiaofeng said that he could and gave me the connection, and then started to operate according to the tutorial,
Update table name set field name=(REPLACE (field name, 'http://', 'https://'));
But there is a problem. Not everyone has learned MySQL. What is the table name? What is the field name? There are many people who don't understand this, so here's a simple way to improve the tutorial: if the sentence is completed correctly, first go to the database (the account password is my own idea, not all hosts support sql statements, which depends on the host vendor) to find the zbp mysql database, as shown in the figure:
Enter the SQL statement just now
update zbp_post set log_Content =(REPLACE( log_Content ,'http://','https://'));
among zbp_post It is the so-called database table name.
In addition log_Content It is the database field name.
PS: Remember to replace the original image connection of the article with a new https connection, Then click Execute to complete batch replacement:
As shown in the figure, http to https has been successfully replaced. The tutorial is over, thank you@ Xiaofeng Blog , the content of the article comes from Song Zhenjiang Blog 。