Home  >  Article  >  Backend Development  >  How to remove index.php from URL using CI framework

How to remove index.php from URL using CI framework

WBOY
WBOYOriginal
2016-08-08 09:25:131195browse

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.

Statement:
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