Force HTTPS to Typecho directory is invalid

Source: Internet
Author: User
I have added an SSL certificate to my personal site, and set HTTP to all jump to HTTPS, why direct HTTP access to the Typecho directory (/blog/) does not jump? Include article page, background page also.
and direct HTTP access to the blog home page, the article link is also http://Instead of https://, I have set the site address in the background is to go httpsOf

In addition, the host said the host is not using 443 port, can only be used RewriteCond %{HTTP:KERSSL} !on to determine whether to go HTTPS, my .htaccess files are as follows:

RewriteCond %{HTTP:KERSSL} !on [NC]RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

Accessing other directories directly with HTTP is capable of jumping to HTTPS.

Reply content:

I have added an SSL certificate to my personal site, and set HTTP to all jump to HTTPS, why direct HTTP access to the Typecho directory (/blog/) does not jump? Include article page, background page also.
and direct HTTP access to the blog home page, the article link is http:// not https:// , I have set the site in the background address is walking https .

In addition, the host said the host is not using 443 port, can only be used RewriteCond %{HTTP:KERSSL} !on to determine whether to go HTTPS, my .htaccess files are as follows:

RewriteCond %{HTTP:KERSSL} !on [NC]RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

Accessing other directories directly with HTTP is capable of jumping to HTTPS.

Increased in the config.inc.php.

define('__TYPECHO_SECURE__', true);

Finally find out the reason, because /blog/ there is another .htaccess , I do not know the first file, so I forgot to add a jump here, so when the access to /blog/ Apache read the directory (that is, .htaccess will not jump from HTTP to HTTPS).

In addition, the solution @joyqi answer is to make the link output https

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.