本教程操作环境:windows7系统、thinkPHP v5版、Dell G3电脑。php 怎么隐藏入口路径?TP5隐藏index.phptp5对URL简化,不做简化情况下我们访问的是localhost/index.php/index/in
本教程操作环境:windows7系统、thinkPHP v5版、Dell G3电脑。
php 怎么隐藏入口路径?
TP5隐藏index.php
tp5对URL简化,不做简化情况下我们访问的是localhost/index.php/index/index/index ,做简化后省去index.php。
我们需要找到public下面的.htaccess文件
apache:
<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>
以上就是php 怎么隐藏入口路径的详细内容,更多请关注编程网其它相关文章!
--结束END--
本文标题: php 怎么隐藏入口路径
本文链接: https://www.lsjlt.com/news/116934.html(转载时请注明来源链接)
有问题或投稿请发送至: 邮箱/279061341@qq.com QQ/279061341
下载Word文档到电脑,方便收藏和打印~
2024-03-21
2024-03-21
2024-03-21
2024-03-21
2024-03-21
2024-03-21
2024-03-21
2024-03-21
2024-03-21
2024-03-21
回答
回答
回答
回答
回答
回答
回答
回答
回答
回答
0