- A long long time ago to learn CodeIgniter notes, very casual, but all of their own records, I hope that the people who need help.
- This article uses word2013 to edit and publish
- Postbird | There I am, in the world more exciting!
- Postbird Personal website:http://www.ptbird.cn
Routing
1. Change the default route file
???? application/config/routes.php
???? Default Controller
????
2, Pseudo-static
???? controllers/article.php
????????
???? Accessing the show_article_id method
???????? Localhost/acodeigniter/index.php/article/show_article_id/
???? Pseudo-static by changing the route. (reg Processing)
???? Access after change
???????? Localhost/acodeigniter/index.php/news/4.html
?
Easy Project Management (date/20150311/4.html) with the following matching
?
3. Apache Rewrite rule---hide portal file
???? Copy the system/.htaccess file to the root directory
???????? Apache needs to support rewriting
???????????? httpd.conf file
???????????????? LoadModule Rewrite_module modules/mod_rewrite.so
????????. htaccess file
???????????? Rewriteengine on
Rewritecond $!^ (index\.php|robots|stafile|upload|\.txt)
Rewriterule ^ (. *) $/acodeigniter/index.php/$1 [L]
???? Access
???????? http://localhost/acodeigniter/news/20160101/4.html????
CodeIgniter Getting Started learning note 09-routing