tp5中隐藏url连接中的index.php
在tp5中,如果你想隐藏掉URL 链接中的index.php;只用 模块/控制器/方法就访问网站,若果你已经在网上搜了很多blog,结果还是没好,试下下图的方法:
如上图的目录下建.htaccess文件,内容如下:
<IfModule mod_rewrite.c>
Options +FollowSymlinks -Multiviews
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php?s=$1 [QSA,PT,L]
</IfModule>