預設的.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/...,頁面可訪問,但報錯如下圖
<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 那些移除來試試看。