tp3.2.3怎么隐藏index.php

tp3.2.3怎么隐藏index.php,第1张

tp3.2.3怎么隐藏index.php

tp3.2.3隐藏index.php的方法:首先找到并打开“.htaccess”文件;然后修改内容为“RewriteRule ^(.*)$ index.php [L,E=PATH_INFO:$1]”即可。

本文 *** 作环境:windows7系统、tp3.2.3版,DELL G3电脑

tp3.2.3如何隐藏index.php?

在.htaccess这个文件中,框架初始的内容是:

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

只需要改成这样(只有最后一行有所改变):

<IfModule mod_rewrite.c>
Options +FollowSymlinks
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php [L,E=PATH_INFO:]
</IfModule>

就可以达到隐藏index.php的效果

相关推荐:最新的10个thinkphp视频教程

以上就是tp3.2.3怎么隐藏index.php的详细内容,

欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/web/702089.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-04-23
下一篇 2022-04-23

发表评论

登录后才能评论

评论列表(0条)

保存