鍍金池/ 問答/PHP  Linux/ 輸入www.xxx.com 和 直接輸入xxx.com 都跳轉(zhuǎn)到https://

輸入www.xxx.com 和 直接輸入xxx.com 都跳轉(zhuǎn)到https://www.xxx.com

  1. .htaccess文件

       RewriteEngine On
       RewriteBase /
       RewriteCond %{SERVER_PORT} !^443$
       RewriteCond %{HTTP_HOST} ^www.lunghealthbiotech.com
       RewriteRule ^.*$ https://%{SERVER_NAME}%{REQUEST_URI} [L,R]
       

    <IfModule mod_rewrite.c>

         Options +FollowSymlinks
         RewriteEngine On
         RewriteCond %{REQUEST_FILENAME} !-d
         RewriteCond %{REQUEST_FILENAME} !-f
         RewriteRule ^(.*)$ index.php/$1 [QSA,PT,L]

    </IfModule>

2.Ubuntb服務(wù)器 phpstudy集成環(huán)境 Linux Apache + mysql

3.現(xiàn)在只是www.lunghealthbiotech.com 可以跳轉(zhuǎn)到https://www.lunghealthbiotech... 沒有配置 lunghealthbiotech.com 要如何修改

需要修改那些配置文件呢

回答
編輯回答
薔薇花

80的全部跳轉(zhuǎn)就好了。管他啥域名。。

2017年7月25日 19:59
編輯回答
網(wǎng)妓

可以設(shè)置 xxx.com 重定向到 www.xxx.com
具體 可以參考我的回答
https://segmentfault.com/q/10...

2017年7月7日 20:16
編輯回答
熊出沒

由于m.不希望跳轉(zhuǎn) 所以只設(shè)置了 www.xx.com 和 xx.com
RewriteEngine On
RewriteBase /
RewriteCond %{SERVER_PORT} !^443$
RewriteCond %{HTTP_HOST} ^www.lunghealthbiotech.com
RewriteRule ^.*$ https://%{SERVER_NAME}%{REQUEST_URI} [L,R]
RewriteCond %{HTTP_HOST} ^lunghealthbiotech.com
RewriteRule ^.*$ https://www.%{SERVER_NAME}%{REQUEST_URI} [L,R]

<IfModule mod_rewrite.c>
Options +FollowSymlinks
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php/$1 [QSA,PT,L]
</IfModule>

2017年1月31日 07:19
編輯回答
浪蕩不羈
<VirtualHost *:80>
DocumentRoot xxxxxxxxxxx
ServerName xxx.com
ServerAlias  www.xxx.com
</VirtualHost>
2017年1月23日 06:34