tp5隐藏index.php的方法

这篇文章给大家分享的是有关tp5隐藏index.php的方法的内容。小编觉得挺实用的,因此分享给大家做个参考。一起跟随小编过来看看吧。

tp5隐藏index.php的方法:首先打开“pullic/static/.htaccess”目录;然后修改内容为“RewriteRule ^(.*)index.php?s =1 [QSA,PT,L]”;最后保存文件即可。

tp5隐藏index.php

目录

//pullic/static/.htaccess

文件内容如下

<IfModule mod_rewrite.c>
Options +FollowSymlinks
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)index.php?s =1 [QSA,PT,L]
</IfModule>

感谢各位的阅读!关于tp5隐藏index.php的方法就分享到这里了,希望以上内容可以对大家有一定的帮助,让大家可以学到更多知识。如果觉得文章不错,可以把它分享出去让更多的人看到吧!