tp5對URL簡化,不做簡化情況下我們通路的是localhost/index.php/index/index/index ,做簡化後省去index.php。
我們需要找到public下面的.htaccess檔案
修改成這樣
<IfModule mod_rewrite.c>
Options +FollowSymlinks -Multiviews
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php?/$1 [QSA,PT,L]
</IfModule>
這樣就可以直接通路localhost/index/index/index 了