【发布时间】:2013-11-22 03:15:38
【问题描述】:
嗨,我有这个子域托管在 bluehost.. 我在互联网上搜索过,但我想..没有人像我一样遇到问题:(
我所做的是在.htaccess中添加了这行代码
#RewriteCond %{SERVER_PORT} 80
#RewriteRule (.*) https://%{SERVER_NAME}/$1 [R,L]
将所有 url 重定向到 https。
但是当我访问该网站时,我得到了
https://ci.domain.com/~hevronwo/ci/~hevronwo/ci/~hevronwo/ci/~hevronwo/ci/~hevronwo/ci/~hevronwo/ci/~hevronwo/ci/~hevronwo/ci/~hevronwo/ci/~hevronwo/ci/~hevronwo/ci/~hevronwo/ci/~hevronwo/ci/~hevronwo/ci/~hevronwo/ci/~hevronwo/ci/~hevronwo/ci/~hevronwo/ci/~hevronwo/ci/user/default/dashboard/start/19
仅供参考:phpinfo() 让我启用了 openssl。我的 .htaccess 代码:
# For security reasons, Option followsymlinks cannot be overridden.
#Options +FollowSymLinks
Options +SymLinksIfOwnerMatch
IndexIgnore */*
RewriteEngine on
RewriteBase /
# if a directory or a file exists, use it directly
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
#RewriteCond %{SERVER_PORT} 80
#RewriteRule (.*) https://%{SERVER_NAME}/$1 [R,L]
RewriteCond %{HTTPS} off
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L,QSA,NE]
# otherwise forward it to index.php
RewriteRule . index.php
#RewriteCond $1 !^(index\.php|robots\.txt)
#RewriteRule ^(.*)$ index.php/$1 [L]
【问题讨论】: