URL rewriting
The usual URL contains index.php, in order to achieve a better SEO effect may need to remove the URL inside the index.php, through the way of URL rewriting can achieve this effect, usually need to open the Server Url_rewrite module to support. The following is the Apache configuration process, you can refer to the following:
1. The mod_rewrite.so module is loaded in the httpd.conf configuration file
2. AllowOverride None Change None to all
3. Make sure the Url_model is set to 2
4. Save the following content as a. htaccess file in a sibling directory of the portal file
<ifmodule mod_rewrite.c>%{request_filename}-%{request_filename}-^ (. *) $ index.php/$1 [qsa,pt,l]</IfModule>
After restarting Apache, the original HTTP://SERVERNAME/INDEX.PHP/BLOG/READ/ID/1 can be accessed HTTP://SERVERNAME/BLOG/READ/ID/1 simplifies the URL address.
Thinkphp using the Rewrite rules of the. htaccess file to hide index.php in the URL