默认的.htaccess为
<IfModule mod_rewrite.c>
Options +FollowSymlinks
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php/ [QSA,PT,L]
</IfModule>
此时访问 http://mydomain.me/home/index...,直接报错Failed to load resource: the server responded with a status of 404 (Not Found)如下图
加上index.php之后,http://mydomain.me/index.php/...,页面可访问,但报错如下图
修改.htaccess后,无需index.php也可访问,但还报错,和上图一样。
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php?s=/ [QSA,PT,L]
</IfModule>
请问原因出在哪里?怎么破?
曾经蜡笔没有小新2017-05-24 11:34:14
Options +FollowSymLinks
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
试一下这个,把IF 那些移除掉试一下。