1. Open the apache configuration file, conf/httpd. conf:
LoadModule rewrite_module modules/mod_rewrite.so, remove the # Before the row.
2. Search for AllowOverride None related to. htaccess in the conf/httpd. conf file (multiple configuration files exist), view the annotation information, and change the row information of related. htaccess to AllowOverride All.
This seems to be the configuration of the Virtual Machine. If not, you can set it to All and try again to know which one is.
3. under the root directory of CI, that is, in index. php, system directory at the same level, create. htaccess, directly creating the file name will not succeed, you can first create a notepad file, save it as a file with this name. The content is as follows (this is also introduced in the CI manual ):
RewriteEngine on
RewriteCond % {REQUEST_FILENAME }! -F // There is a big pitfall here. This statement ensures normal loading of General css and js files. (Delete this comment)
RewriteCond $1! ^ (Index \. php | images | robots \. txt)
RewriteRule ^ (. *) $/index. php/$1 [L]
4. Change the configuration in CodeIgniter \ application \ config$ Config['Index _ page'] ='';
OK. Remember to restart apache.