如何将ThinkPHP3.2.3隐藏index.php设置为长尾关键词?

2026-04-18 11:292阅读0评论SEO问题
  • 内容介绍
  • 文章标签
  • 相关推荐

本文共计316个文字,预计阅读时间需要2分钟。

如何将ThinkPHP3.2.3隐藏index.php设置为长尾关键词?

要隐藏 `index.php`,可以按照以下步骤操作:

1. 首先找到并打开 `.htaccess` 文件。

2.在 `.htaccess` 文件中添加以下重写规则:

RewriteRule ^(.*)$ index.php [L,E,PATH_INFO=$1]

3. 保存并关闭 `.htaccess` 文件。

这样设置后,所有访问网站时原本显示的 `index.php` 文件名将被隐藏,用户将无法直接看到 `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/$1 [QSA,PT,L] </IfModule>

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

如何将ThinkPHP3.2.3隐藏index.php设置为长尾关键词?

<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的效果

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

以上就是tp3.2.3怎么隐藏index.php的详细内容,更多请关注自由互联其它相关文章!

本文共计316个文字,预计阅读时间需要2分钟。

如何将ThinkPHP3.2.3隐藏index.php设置为长尾关键词?

要隐藏 `index.php`,可以按照以下步骤操作:

1. 首先找到并打开 `.htaccess` 文件。

2.在 `.htaccess` 文件中添加以下重写规则:

RewriteRule ^(.*)$ index.php [L,E,PATH_INFO=$1]

3. 保存并关闭 `.htaccess` 文件。

这样设置后,所有访问网站时原本显示的 `index.php` 文件名将被隐藏,用户将无法直接看到 `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/$1 [QSA,PT,L] </IfModule>

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

如何将ThinkPHP3.2.3隐藏index.php设置为长尾关键词?

<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的效果

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

以上就是tp3.2.3怎么隐藏index.php的详细内容,更多请关注自由互联其它相关文章!