The Chinese language has never been very good. I really don't know how to explain this pathinfo mode. let's talk about the pathinfo mode with a piece of code.
The code is as follows:
Http: // serverName/appName/module/action/id/1/
This is the pathinfo mode.
Without considering routing, the first parameter will be parsed into a module name (if grouping is enabled, it will be rolled back in sequence), and the second parameter will be parsed into an operation, the following parameters are explicitly transmitted and must appear in pairs. for example:
The code is as follows:
Http: // serverName/appName/module/action/year/2008/month/09/day/21/
The URL usually contains index. php, in order to achieve better SEO effect, you may need to remove the index in the URL. php, which can be achieved through URL rewriting, usually requires the server to enable the URL_REWRITE module.
The configuration process of Apache is as follows:
1. the mod_rewrite.so module is loaded in the httpd. conf configuration file.
2. change AllowOverride None to All
3. make sure that URL_MODEL is set to 2.
4. Save the following content as a. htaccess file and put it under the same directory of the entry file
The code is as follows:
RewriteEngine on
RewriteCond % {REQUEST_FILENAME }! -D
RewriteCond % {REQUEST_FILENAME }! -F
RewriteRule ^ (. *) $ index. php/$1 [QSA, PT, L]
Never touched again. the htacces file can be Baidu. here we will remind you that the saved file name is. htaccess, which may only look like a suffix. do not add a *** in front of it ***. htaccess.
After Apache is restarted, the original
Http: // serverName/index. php/Blog/read/id/1
You can access
Http: // serverName/Blog/read/id/1
Simplified URL