Introduction: This is a detailed page of codeigniter URL rewriting (removing index. php Routing). It introduces PHP, related knowledge, skills, experience, and some PHP source code.
Class = 'pingjiaf' frameborder = '0' src = 'HTTP: // biancheng.dnbc?info/pingjia.php? Id = 340520 'rolling = 'no'>
In the codeigniter path configuration, the index. php route is used by default. It is best to remove this index. php when beautifying the URL for Seo, that is, rewrite the URL.
The correct method is provided here:
① Enable the rewrite module of the httpd. conf configuration file of Apache, that is, the rewrite_module module, and configure AllowOverride to all.
② If Apache is configured, configure the. htaccess file now. If your file is configured in the root directory as follows:
<Ifmodule mod_rewrite.c>
Rewriteengine on
Rewritecond % {request_filename }! -D
Rewritecond % {request_filename }! -F
Rewriterule ^ (. *) $/index. php/$1 [QSA, PT, l]
</Ifmodule>
Note that if your file is not in the root directory, for example, in the CI folder of the root directory, You need to configure the file as follows:
<Ifmodule mod_rewrite.c>
Rewriteengine on
Rewritecond % {request_filename }! -D
Rewritecond % {request_filename }! -F
Rewriterule ^ (. *) $/Ci/index. php/$1 [QSA, PT, l]
</Ifmodule>
In this way, Your URL rewriting will take effect.
Love J2EE follow Java Michael Jackson video station JSON online tools
Http://biancheng.dnbcw.info/php/340520.html pageno: 7.