Home page >> Related Tutorials >>Body

The solution of pbootcms program not jumping to https under the virtual host

Author: A little Jack    Time: 2023-07-26 10:01:18    Browse: 284   

This problem is found when using the pbootcms program. The environment is AliCloud virtual host. After https is normally enabled, it can realize http jump to https, but only the content does not jump, such as:

http://www.xx.com/new/xxx.html Do not jump https://www.xx.com/new/xxx.html

First, I found many solutions on the Internet, such as enabling automatic https jump in the background of pbootcms

 The solution of pbootcms program not jumping to https under the virtual host

Enable automatic https jump in the background of pbootcms

However, it is invalid, and then the mandatory https is enabled in Alibaba Cloud host management. It is also invalid. Later, it was thought that it would be implemented directly with pseudo static rules.

The pseudo static rules for http forced jump https are as follows (only applicable to the Apache environment):

In the site directory of the virtual host, add the following contents to the file. htaccess to test whether it can be accessed:

 RewriteEngine onRewriteBase / RewriteCond %{SERVER_PORT} !^ 443$ RewriteRule ^.*$ https://%{SERVER_NAME}%{REQUEST_URI} [L, R]

If it can be accessed, the original pbootcms rule:

 RewriteEngine  OnRewriteCond %{REQUEST_FILENAME} !- d RewriteCond %{REQUEST_FILENAME} !- f RewriteRule ^(.*)$ index.php? p=$1 [QSA, PT,L]

Change to the following code:

Hello, you need to log in to our account to view the hidden content, please first Sign in To view!

The above is the solution to the problem that the pbootscms program http does not jump to https. I hope it can help you.


Text label: pbootcms   Pseudo static   https  
 A little Jack

A little Jack https://lkba.cn

The blogger focuses on Z-Blog website construction, website optimization, computer troubleshooting, reinstallation, optimization, maintenance system, etc, QQ/WX: 2126245521 (please specify the purpose)

Related articles

Previous:

Next:

No comment for this article - Welcome

 Please fill in the verification code

Processed : 0.050 SQL : 14