【发布时间】:2018-05-06 08:58:58
【问题描述】:
htaccess:
RewriteEngine On
RewriteCond $1 !^(index\.php|resources|robots\.txt)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L,QSA]
RewriteCond %{HTTP_HOST} !^www\.
RewriteRule ^(.*)$ https://www.%{HTTP_HOST}/$1 [R=301,L]
RewriteCond %{HTTPS} !=on
RewriteRule ^.*$ https://%{HTTP_HOST}%{REQUEST_URI} [R,L]
我在.htaccess 中使用的上述代码现在我想在有人键入example.com/abc 时重定向到https://www.example.com/abc。
当我转到example.com/abc 时使用上面的代码,它显示404 错误。
所以请有人帮我解决这个问题。感谢您的回答。
【问题讨论】:
标签: php .htaccess codeigniter amazon-web-services