|
步驟一:
- config.php
- admin/config.php
複製代碼
http網址更改為https
define('HTTPS_SERVER', 'http://yourdomain.com/');
改 define('HTTPS_SERVER', 'https://yourdomain.com/');
步驟二:
到 OpenCart 後台 登入admin 啟動SSL
商店設置
伺服器設定 啟用SSL
步驟三:強制啟動SSL
到.htaccess下新增
- RewriteCond %{SERVER_PORT} !^443$
- RewriteRule ^.*$ https://%{SERVER_NAME}%{REQUEST_URI} [L,R]
- RewriteCond %{HTTP_HOST} !^<span style="background-color: rgb(255, 255, 255);">yourdomain</span>.com$ [NC]
- RewriteRule ^(.*)$ https://<span style="background-color: rgb(255, 255, 255);">yourdomain</span>.com/$1 [L,R=301]
複製代碼
文章出處 NetYea 網頁設計 |
|