thinkphp消除URL中index.php的方法
来源:互联网 发布:大家都用阿里云做什么 编辑:程序博客网 时间:2024/04/30 10:10
每次部署到新环境都会忘记,在这里记录一下:
1、httpd.conf配置文件中加载了mod_rewrite.so模块
2、AllowOverride None 将None改为 All
3、conf/config.php中确保URL_MODEL设置为2
4、在项目目录中把.htaccess 文件改成
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php/$1 [QSA,PT,L]
</IfModule>
重启Apache
http://<serverName>/index.php/Blog/read/id/1?
就可以通过写成
http://<serverName>/Blog/read/id/1
0 0
- thinkphp消除URL中index.php的方法
- apache服务器开启rewrite以及使用rewrite将thinkphp的url中index.php消除
- thinkphp在wamp 配置去掉url中index.php方法
- Thinkphp中去除URL里的index.php
- 【ThinkPHP】ThinkPHP下载、部署,Helloworld,消除难看的index.php
- ThinkPHP-URL中去掉index.php
- ThinkPHP URL中去除index.php
- thinkphp 去掉URL 里面的index.php
- 隐藏CodeIgniter程序URL中index.php的方法
- Yii隐藏URL中index.php的方法
- Thinkphp 隐藏 index.php 方法
- ThinkPHP去掉URL中的index.php
- ThinkPHP去除url中的index.php
- ThinkPHP去除url中的index.php
- thinkPHP如何去掉url中的index.php
- ThinkPHP去除url中的index.php
- ThinkPHP去除url中的index.php
- thinkphp 如何去除url中的index.php
- 操作系统学习--线程
- eclipse启动时报错org.eclipse.core.runtime.AssertionFailedException: assertion failed: The application ...
- register
- [LeetCode 8] String to Integer(atoi)
- Redis学习总结(JAVA篇)
- thinkphp消除URL中index.php的方法
- 优化数据页面(29)——打印连续页码
- Linux httpd 配置端口 apache httpd 域名配置
- 矩阵元素查找
- Java流程控制
- 启动hive命令报错 “Metastore contains multiple versions”
- login
- 重新编辑table中第一列的行号,如果有需要
- trie字母查找树java实现