thinkphp隐藏中url的index.php
2014-12-27 11:13
489 查看
在本地进行测试
1.修改apache配置文件将如下代码#去掉
在index.php 目录下新建文件.htaccess文件
在配置文件config.php修改URL模式
在万网UNIX虚拟主机,开放了PHP-Rewrite功能官网提供了一个测试的小程序http://help.www.net.cn/knowledge_detail.htm?spm=5334.7618386.5.1.0T8ePV&knowledgeId=5868355&keyWords=unix%E8%99%9A%E6%8B%9F%E4%B8%BB%E6%9C%BAphp-rewrite%E6%B5%8B%E8%AF%95%E7%A8%8B%E5%BA%8F&categoryId=8311139
万网虚拟主机设置方法与在本地设置相同
1.修改apache配置文件将如下代码#去掉
#LoadModule rewrite_module modules/mod_rewrite.so
在index.php 目录下新建文件.htaccess文件
<IfModule mod_rewrite.c> RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*)$ index.php/$1 [QSA,PT,L] </IfModule>
在配置文件config.php修改URL模式
'URL_MODEL'=>2,
在万网UNIX虚拟主机,开放了PHP-Rewrite功能官网提供了一个测试的小程序http://help.www.net.cn/knowledge_detail.htm?spm=5334.7618386.5.1.0T8ePV&knowledgeId=5868355&keyWords=unix%E8%99%9A%E6%8B%9F%E4%B8%BB%E6%9C%BAphp-rewrite%E6%B5%8B%E8%AF%95%E7%A8%8B%E5%BA%8F&categoryId=8311139
万网虚拟主机设置方法与在本地设置相同
相关文章推荐
- ThinkPHP 利用.htaccess文件的 Rewrite 规则隐藏URL中的 index.php
- ThinkPHP 隐藏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
- thinkPHP隐藏url地址栏中的index.php方法
- thinkphp报错No input file specified. (对于隐藏url中的index.php 是如何做到的?)
- thinkPHP Apache 优化url,隐藏index.php所需配置
- 【淘梦网络】thinkphp5 url中隐藏public目录和index.php
- ThinkPHP 利用.htaccess文件的 Rewrite 规则隐藏URL中的 index.php
- Nginx服务器下ThinkPHP5访问出现404以及URL隐藏index.php
- ThinkPHP 利用.htaccess文件的 Rewrite 规则隐藏URL中的 index.php
- thinkPHP网络地址栏分隔符,url从写 隐藏index.php目录入口文件
- ThinkPHP 利用.htaccess文件的 Rewrite 规则隐藏URL中的 index.php
- ThinkPHP下隐藏index.php以及URL伪静态
- ThinkPHP中通过URL重写隐藏应用的入口文件index.php的相关服务器的配置
- ThinkPHP去除url中的index.php
- nginx rewrite 隐藏index.php,利用pathinfo让url更友好