url中去掉index.php
2012-12-02 18:22
323 查看
php的项目可能都要求最后在url中去掉index.php,这个要配置.htaccess文件。
首先,.htaccess文件的位置。在apache的httpd-vhosts.conf中配置了改项目的DocumentRoot,必须放到DocumentRoot下。
其次,在.htaccess文件中加入
对了,还要打开apache的rewrite引擎。
首先,.htaccess文件的位置。在apache的httpd-vhosts.conf中配置了改项目的DocumentRoot,必须放到DocumentRoot下。
其次,在.htaccess文件中加入
RewriteEngine on RewriteCond $1 !^(index\.php|images|robots\.txt) RewriteRule ^(.*)$ /index.php/$1 [L]
对了,还要打开apache的rewrite引擎。
相关文章推荐
- 在nginx下去掉ci框架url中的index.php
- 如何去掉Magento默认URL中的index.php
- 去掉CodeIgniter(CI)默认url中的index.php的步骤(完整版)
- php中关于ci框架修改后缀并去掉url中的index.php
- 如何去掉CodeIgniter URL中的index.php
- ThinkPHP-URL中去掉index.php
- apache2.2.21下配置url地址重写 去掉index.php
- Magento入门基础 - - 更改URL,去掉index.php
- 如何去掉Magento默认URL中的index.php
- 解析如何去掉CodeIgniter URL中的index.php
- php 去掉Url里的 index.php
- CodeIgniter(CI)去掉默认url中的index.php
- CodeIgniter的URL去掉index.php
- CodeIgniter 去掉/去除/删除 URL中index.php 的方法
- 如何去掉CodeIgniter URL中的index.php
- 去掉CodeIgniter URL中的index.php
- 如何去掉Magento默认URL中的index.php
- 去掉CodeIgniter URL中的index.php
- 去掉CodeIgniter(CI)默认url中的index.php的步骤: