1. Make sure Apache supports mod_rewrite.
1) Open apache2.2 \ conf \ httpd. conf.
Search loadmodule rewrite_module modules/mod_rewrite.so (this is apache2)
Remove the previous #
2) Replace AllowOverride none with AllowOverride all (note: There are several)
2. Create a configuration file under the CI root directory named:. Htaccess. The file content is as follows::
Rewriteengine on
Rewritecond $1! ^ (Index \. php | images | robots \. txt)
Rewriterule ^ (. *) $/index. PHP/$1 [l] Note/index. PHP/$1 depends on your directory (web directory, such as http: // www.
34 ways. Com/index. php). For example, if the root directory of the website is/34 ways/index. php, it must be written
/34 ways/index. php/$1 Note:Rewritecond $1! ^ (Index \. php | images | robots \. txt) Here is the path and file to be ignored. For example, you can write rewritecond $1! ^ (Index \. php | images | robots \. txt | theme)
3,Modify config. phpThe following content in this file
$ Config ['index _ page'] = "index. php ";
Change "index. php".
OK, so you can remove index. php.