如何在不修改tp5框架结构的情况下隐藏index.php文件?
- 内容介绍
- 文章标签
- 相关推荐
本文共计218个文字,预计阅读时间需要1分钟。
要隐藏tp5框架下的index.php,可以按照以下步骤操作:
1. 打开目录pullic/static/.htaccess。
2.修改文件内容,添加以下规则:
RewriteRule ^(.*)index\.php$ $1 [QSA,PT,L]3.保存并关闭文件。
这样设置后,访问index.php时将会被重定向到相应的URL路径,从而隐藏index.php文件。
tp5隐藏index.php的方法:首先打开“pullic/static/.htaccess”目录;然后修改内容为“RewriteRule ^(.*)index.php?s =1 [QSA,PT,L]”;最后保存文件即可。
推荐教程:《thinkphp框架》
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的详细内容,更多请关注自由互联其它相关文章!
本文共计218个文字,预计阅读时间需要1分钟。
要隐藏tp5框架下的index.php,可以按照以下步骤操作:
1. 打开目录pullic/static/.htaccess。
2.修改文件内容,添加以下规则:
RewriteRule ^(.*)index\.php$ $1 [QSA,PT,L]3.保存并关闭文件。
这样设置后,访问index.php时将会被重定向到相应的URL路径,从而隐藏index.php文件。
tp5隐藏index.php的方法:首先打开“pullic/static/.htaccess”目录;然后修改内容为“RewriteRule ^(.*)index.php?s =1 [QSA,PT,L]”;最后保存文件即可。
推荐教程:《thinkphp框架》
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的详细内容,更多请关注自由互联其它相关文章!

