首页 > 代码库 > Thinkphp5笔记九:路由设置,隐藏indx.php

Thinkphp5笔记九:路由设置,隐藏indx.php

网站根目录下.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>

 

 

详细参考手册:http://www.kancloud.cn/manual/thinkphp5/177576

Thinkphp5笔记九:路由设置,隐藏indx.php