Php 如何配置codeigniter站点的SSL?
我的.htaccess文件Php 如何配置codeigniter站点的SSL?,php,codeigniter,Php,Codeigniter,我的.htaccess文件 RewriteEngine On RewriteCond %{HTTPS} !=on RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] 你应该有这样的东西 RewriteRule ^.*$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] 尝试用此替换您的规则复制以下代码并粘贴到您的.htaccess文件中: #First rewrite any reque
RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
你应该有这样的东西
RewriteRule ^.*$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
尝试用此替换您的规则复制以下代码并粘贴到您的.htaccess文件中:
#First rewrite any request to the wrong domain to use the correct one (here www.)
RewriteCond %{HTTP_HOST} !^www\.
RewriteRule ^(.*)$ https://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
#Now, rewrite to HTTPS:
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]