.
3ss.cn

tp3.2.3怎么样躲藏index.php

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

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/$1 [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:$1]
</IfModule>

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

赞(0)
未经允许不得转载:互联学术 » tp3.2.3怎么样躲藏index.php

评论 抢沙发