Home >Backend Development >PHP Problem >How to remove index.php from ci url
How to remove index.php from ci url: first modify the configuration file; then search for htaccess and change AllowOverride None to "AllowOverride All"; finally create a ".htaccess" file.
The operating environment of this article: Windows 7 system, CodeIgniter version 3.0, DELL G3 computer
Remove index.php:
First modify the configuration file, $config['index_page'] = ' '; Set empty
Then modify Apache and search for htaccess Change AllowOverride None to AllowOverride All
rewrite_module modules/mod_rewrite.so Open and remove
.htaccess file (use Notepad to create .htaccess) and write the following content:
##RewriteEngine on
RewriteRule ^( .*)$ /
codeIgniter
/index.php/$1 [L]My project address is http://localhost/
/index.php/ userRestart Apache and access http://localhost/codeIgniter/user directly
Recommended: "
PHP Video TutorialThe above is the detailed content of How to remove index.php from ci url. For more information, please follow other related articles on the PHP Chinese website!