Home > Backend Development > PHP Tutorial > CI 框架去掉url 中index.php的步骤

CI 框架去掉url 中index.php的步骤

WBOY
Release: 2016-06-13 12:18:58
Original
777 people have browsed it

CI 框架去掉url 中index.php的方法

1 修改 apache 的 httpd.conf 文件 

#LoadModule rewrite_module modules/mod_rewrite.so   

去掉前面的# 

2 找到 你程序目录下的 .htaccess 文件

内容如下


RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php/$1 [L]

 

保存 ,重启就好了

 

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template