Last update at :2024-06-17,Edit by888u
OneinStack, like the familiar LNMP, is a relatively well-known and powerful Linux server WEB installation script. When we use the OneinStack LNMP (Nginx) environment, we can set forced HTTPS and 301 jumps during the installation wizard. However, when installing LAMP (Apache), we can install SSL, but there is no prompt for forced settings in the wizard, and there is no Prompt to set 301 jump.
Because of the difference between the Apache environment and the Nginx configuration file, there is no way to force the setting, because the former will be in the .htaccess file in the root directory of the website. If we set it when installing the domain name, later when we use pseudo-static, some programs are Automatically generated, so it is easy to conflict or be replaced. Snail's guess is that the author did not set up the Apache environment installation wizard for this purpose.
Since there is no setting, if our website needs to be set, we need to complete the settings in the .htaccess file in the website root directory after the website program is installed.
RewriteEngine OnRewriteCond %{HTTP_HOST} !^www.laobuluo.com$ [NC]RewriteRule ^(.*)$ https://www.laobuluo.com/$1 [L,R=301]RewriteCond %{SERVER_PORT} 80RewriteRule ^(.*)$ https://www.laobuluo.com/$1 [L,R=301]
Replace the domain name in the script with the domain name of the site you need, and then replace it in the .htaccess file of the current site to achieve 301 redirect and force HTTPS certificate form.
Recommended site search: website registration domain name query, website registration information, national dynamic IP, US asp space, Korean cheap server, registration-free space, mainland China free space, registration-free space, ip proxy server, free cloud server, < /p>
发表评论