【发布时间】:2016-05-08 14:40:51
【问题描述】:
我正在将我的 Web 应用程序移动到同一主机上的新域,我已经编辑了 .htaccess 文件,现在看到了一个重定向循环。新域没有 HTTPS,但旧域有 SSL 证书。我想对新域不使用 SSL。这是我在 .htaccess 文件中的内容:
RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://www.mywebsite.com/$1 [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]
【问题讨论】:
标签: php apache .htaccess codeigniter ssl