【发布时间】:2018-11-27 12:54:06
【问题描述】:
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [L,QSA]
RewriteCond %{HTTPS} off
RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteRule .* https://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
</IfModule>
我使用Codeigniter 框架创建了一个网站,我的域和主机位于GoDaddy。现在,我已经安装了SSL certificate 并使用我的网站进行管理。现在,当我在 URL 中使用example.com 时,它会将我重定向到https://www.example.com,但是当我点击我的login 页面时,它会显示Not Found 并且URL 看起来像https://www.example.com/index.php?/login,但我想要像https://www.example.com/login 这样的URL。那么,我该怎么做呢?请帮忙。
谢谢
【问题讨论】:
标签: .htaccess codeigniter ssl-certificate