CI go to index. php introduction: This is the detailed page of CI go to index. php. it introduces php, related knowledge, skills, experience, and some php source code.
Class = 'pingjiaf' frameborder = '0' src = 'http: // biancheng.dnbc?info/pingjia.php? Id = 339584 'Rolling = 'no'>
The default rewrite url of CI is similar to this. for example, if your CI root directory is under/CodeIgniter/, your second-level url is similar to http: // localhost/CodeIgniter/index. php/welcome. Not very nice. how can I remove index. php from it?
1. open the apache configuration file, conf/httpd. conf:
LoadModule rewrite_module modules/mod_rewrite.so, remove the # before the row.
Search for AllowOverride None (there are multiple configuration files), view the comments, and change the row information of related. htaccess to AllowOverride All.
2. 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 ):
2 |
RewriteCond $1! ^ (Index \. php | images | robots \. txt) |
3 |
RewriteRule ^ (. *) $/index. php/$1 [L] |
If the file is not in the root directory of www, for example, my file is http://www.nowamagic.net/codeigniter/, and the third line is rewriterule ^ (. *) $/CodeIgniter/index. php/$1 [L]
In addition, my index. php Directory has the js folder and css folder under the same level, which need to be filtered out, and the second line needs to be rewritten as: RewriteCond $1! ^ (Index \. php | images | js | css | robots \. txt)
3. set the configuration file (system/application/config. $ config ['index _ page'] = "index. php "; set $ config ['index _ page'] = "";.
View source print?
02 |
| -------------------------------------------------------------------------- |
04 |
| -------------------------------------------------------------------------- |
06 |
| Typically this will be your index. php file, unless you 've renamed it |
07 |
| Something else. If you are using mod_rewrite to remove the page set this |
08 |
| Variable so that it is blank. |
11 |
$ Config ['index _ page'] = ''; |
OK. Remember to restart apache.
That's easy. have a good experience with CI ~
Love J2EE follow Java Michael Jackson video station JSON online tools
Http://biancheng.dnbcw.info/php/339584.html pageNo: 8.