【发布时间】:2015-12-28 05:20:24
【问题描述】:
如果您访问Non HTTPS version,它不会重定向到 HTTPS 版本。相反,它看起来像 https://www.www.mywebsite.com 并且不起作用。这是我的 htaccess 文件中的代码。
RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule .* https://www.%{SERVER_NAME}%{REQUEST_URI} [R=301,L]
#Checks to see if the user is attempting to access a valid file,
#such as an image or css document, if this isn't true it sends the
#request to index.php
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond $1 !^(index\.php|public|images|robots\.txt|css)
RewriteRule ^(.*)$ index.php/$1 [L]
【问题讨论】:
标签: apache .htaccess http https