Want to get rid of index.php, because all the addresses are too long with this.
The steps are as follows:
1, modify the Apache configuration file httpd.conf
Open Putty and execute the following command
VIM/ETC/HTTPD/CONF/HTTPD.CONFI//Enter edit mode/mod_rewrite.so//Execute Find command, will load module before the #/allowoverride//Execute Find command, allowoverride None change None to Alesc:wq//Save exit Vim. htaccess//Enter index.php sibling directory, create. htaccess, create and edit files using the Vim command. htaccess is a hidden file, It is not visible to use the LS command under XFTP and Putty. <ifmodule mod_rewrite.c> rewriteengine on Rewritecond%{request_filename}!-d rewritecond%{REQUEST_FILENAME}!-f Rewriterule ^ (. *) $ index.php/$1 [qsa,pt,l]</ifmodule> Paste the above statement, save exit service httpd restart restart Apache
Perform a link without index.php to see if it is displayed correctly, and then proceed to the next step if possible
2, the previous step although the removal of index.php can be correctly accessed, but the use of the U function automatically generated links or with index.php
Need to modify config.php
Vim application/common/conf/config.php add ' Url_model ' =>2 to the configuration parameters,
Test successful, OK
The next time you use URL rules, continue simplifying