在htaccess文件中隐藏index.php
2012-12-20 21:52
316 查看
仅适用于Apache下面,如果你的Apache已经开启rewrite模块的话(大部分环境都已经开启),可以在.htaccess文件中添加下面代码:
即可实现,把
http://thinkphp.cn/index.php/down
地址中的index.php隐藏,利用SEO。
<IfModule mod_rewrite.c> RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*)$ index.php/$1 [QSA,PT,L] </IfModule>
即可实现,把
http://thinkphp.cn/index.php/down
地址中的index.php隐藏,利用SEO。
相关文章推荐
- 129.在htaccess文件中隐藏index.php
- ThinkPHP 利用.htaccess文件的 Rewrite 规则隐藏URL中的 index.php
- ThinkPHP 利用.htaccess文件的 Rewrite 规则隐藏URL中的 index.php
- ThinkPHP 利用.htaccess文件的 Rewrite 规则隐藏URL中的 index.php
- ThinkPHP 利用.htaccess文件的 Rewrite 规则隐藏URL中的 index.php
- ThinkPHP 利用.htaccess文件的 Rewrite 规则隐藏URL中的 index.php
- ThinkPHP 利用.htaccess文件的 Rewrite 规则隐藏URL中的 index.php
- 利用.htaccess文件的 Rewrite 规则隐藏URL中的 index.php
- ThinkPHP 利用.htaccess文件的 Rewrite 规则隐藏URL中的 index.php
- ThinkPHP 利用.htaccess文件的 Rewrite 规则隐藏URL中的 index.php
- ThinkPHP 利用.htaccess文件的 Rewrite 规则隐藏URL中的 index.php
- CI框架 .htaccess 隐藏url中index.php的解决
- CI框架 .htaccess 隐藏url在index.php解决方案
- Yii Framework隐藏index.php文件的步骤
- Ubuntu-server 下Apache2 配置.htaccess 隐藏thinkPHP项目index.php
- Thinkphp5-隐藏入口文件index.php(URL重写)
- ThhinkPHP5隐藏入口文件index.php
- Yii Framework隐藏index.php文件的步骤
- Nginx 隐藏入口文件 index.php
- ThinkPHP3.2URL重写隐藏应用的入口文件index.php