Typecho Enable SSL Enable https


Station construction 10413 Read 11 Comments

The typecho blog opens the https tutorial

 typecho.jpg

Replace all http picture files in the article with https
Replace sharp tools through Typecho global HTTPS URL
https://www.typechodev.com/plugins/%E5%85%B6%E4%BB%96%E6%8F%92%E4%BB%B6/typecho -url-replace.html
Replace all pictures in the article with https, provided that the domain name bound to your map bed/cloud storage has enabled https

After re visiting, I found that the homepage has been encrypted, but when I visited the article page, I was prompted that it was unsafe. After checking with F12, it was the action address of the comment form or HTTP At this time, add it under config.inc.php

 /**Turn on HTTPS*/ define('__TYPECHO_SECURE__',true);

After refreshing, it should be resolved. If it is still unresolved, open comments.php in the theme directory and replace the $this ->commentUrl() in the file with echo str_replace ("http", "https", $this ->commentUrl()); OK (some topics do not
Then comes the HTTPS of the whole site, which is implemented through the mandatory HTTPS of Zaiyun. You can also set it directly in the panel
Or add the following under. htaccess
RewriteEngine on
RewriteBase /
RewriteCond %{SERVER_PORT} !^ 443$
RewriteRule ^.*$ https://% {SERVER_NAME}%{REQUEST_URI} [L,R]
Then when you access http, you will directly jump to https

If the host does not support pseudo static, please read this article

[post cid="91" /]

Last updated 2019-02-17
comment ( 11 )
O ω O
Private comments
  1. s
    4 years ago Dongguan City, Guangdong Province reply
  2. s

    Can't comment

    4 years ago Dongguan City, Guangdong Province reply
    1. @s

      Yes, no comments

      4 years ago Nanjing, Jiangsu Province reply
  3. s
    4 years ago Dongguan City, Guangdong Province reply
  4. Reference to the article of the big guy, successfully running ssl. Google has a small green lock. I have been struggling for several days

    5 years ago Huainan City, Anhui Province reply
  5. lzy

    After I set it, the Chrome display is safe, but the Firefox display is not. Do bloggers know how to solve this problem?

    5 years ago Hohhot, Inner Mongolia reply
  6. Xu

    The big guy changed the code path by himself. He changed the http to https. He couldn't find it and didn't know how to replace it.

    5 years ago Beijing reply
    1. @Xu

      If the image is out of the chain, you need to change it in the article. If the image is in the site, you can force https access after enabling ssl.

      5 years ago Suzhou, Jiangsu Province reply
      1. Xu
        @Reserved party

        Well, thank you, boss. The problem has been solved. The reason is that two PHP plug-ins are missing, so forcing ssl to request image resources is not possible.

        5 years ago Beijing reply
        1. Ink traveller
          @Xu

          Ooh, ooh, ooh, ooh, ooh, ooh, ooh, ooh, ooh, ooh, ooh, ooh, ooh, ooh, ooh, ooh, ooh

          4 years ago Nanjing, Jiangsu Province reply
  7. Xu

    Can you ask me how to change "all pictures in the article"? My picture address is under/usr/themes/default/images/thumbs/, thanks

    5 years ago Beijing reply