Thinkphp One of the lessons: Deployment directory
Introduction to thinkphp Project deployment:
In order to improve the security of the site, the system directory and the project directory can be placed under the non- WEB access directory, the site directory only need to place public directory and portal files.
such as (personal ideas to share to everyone, enthusiastic to speak, learn from each other!! ):
Another two small and practical cutting necessary technology, hehe, look at the thinkphp manual pick ...
1. Implement URL access is case-insensitive
Write the following formulation into the configuration file of the project directory (app/conf/config.php.)
Implement URL access is case-insensitive ' url_case_insensitive ' =>true
2, the usual URL contains index.php, in order to achieve a better SEO effect may need to remove the URL inside the index.php
This effect can be achieved through URL rewriting, which usually requires the server to turn on the Url_rewrite module for 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
Rewriteengine on
Rewritecond%{request_filename}!-d
Rewritecond%{request_filename}!-f
Rewriterule ^ (. *) $ index.php/$1 [qsa,pt,l]
Restart Apache