When I re-contact a frame, I must first remove the entry file, that is, index.php this thing is not pretty on the URL, and every time I visit my site to go into the URL. This tells a way to get rid of the portal file inside the CI framework, which is actually adding a redirect. Many of the framework's operations are similar.
The words return to the positive turn ....
1.
LoadModule rewrite_module modules/mod_rewrite.so, remove the # before the line.
Search AllowOverride None (there are multiple places in the configuration file), look at the comment information, change the line information of the related. htaccess to allowoverride all.
2. Under the CI root directory, that is, in the index.php,system of the same sibling directory, the establishment of the. htaccess, directly establish the file name is not successful, you can first create a Notepad file, save as the name of the file. The content is as follows (also described in the CI manual):
Rewriteengine on
Rewritecond $!^ (index\.php|images|robots\.txt)
Rewriterule ^ (. *) $/index.php/$1 [L]
If the file is not in the root directory of WWW, for example my is: http://localhost/CI/index.php/, the third line needs to be rewritten as Rewriterule ^ (. *) $/ci/index.php/$1 [L].
In addition, my index.php's sibling directory also has JS folder and CSS folder, these need to filter to remove, the second line needs to be rewritten as: Rewritecond $!^ (index\.php|images|js|css|robots\.txt).
3. Place the CI in the configuration file (system/application/config/config.php) $config[' index_page ' = "index.php"; $config[' index_page '] = "";.
That's it, but remember to start Apache.
The redirection rules above can also be written as a. htacess file under Linux. To the root directory of the Web site.
Reprint please indicate source: CI Framework How to remove hidden entry file index.php
Http://www.php1.cn/Content/CI_KuangJiaZenMeQuDiaoYinCangRuKouWenJian_index-php.html
How does the CI framework get rid of hidden portal files index.php