Home > Article > Backend Development > CodeIgniter (CI) removes indexphp from the default url
1. Open the apache configuration file, conf/httpd.conf:
LoadModule rewrite_module modules/mod_rewrite.so
Remove the # before this line.
2. Search for AllowOverride None (there are many places in the configuration file), look at the comment information, and change the relevant .htaccess line information to:
AllowOverride All
<IfModule rewrite_module> Options +FollowSymLinks IndexIgnore */* RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . index.php </IfModule>4. Modify application/config/config.php
$config['index_page'] = 'index.php';
to
$config['index_page'] = '';
The above introduces CodeIgniter (CI) to remove indexphp in the default URL, including the relevant content. I hope it will be helpful to friends who are interested in PHP tutorials.