Thinkphp one of the learning Introductions: Deployment Directory

Source: Internet
Author: User
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

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.