How to remove index.php from URL using CI framework

WBOY
Release: 2016-08-08 09:25:13
Original
1216 people have browsed it

1 Modify apache’s httpd.conf file

#LoadModule rewrite_module modules/mod_rewrite.so

Remove the # in front

2 Find the .htaccess file in your program directory

The content is as follows


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

Save and just restart

The above introduces the CI framework method of removing index.php in the URL, including the relevant content. I hope it will be helpful to friends who are interested in PHP tutorials.

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
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!