[thinkphp] Hide background address

Source: Internet
Author: User

Transfer from Http://document.thinkphp.cn/manual_3_2.html#module_deploy

If you do not want users to access a module directly, you can set up a module map (protection for the background is more practical).

    1. ‘URL_MODULE_MAP‘ => array(‘test‘=>‘admin‘),

Note: After the module mapping is set, the original admin module will not be accessible and can only access the test module.

Our Access http://serverName/Admin will report errors that the module does not exist, while the http://serverName/test admin module can be accessed normally.

If you also set MODULE_ALLOW_LIST parameters, you must change the original module in the Allow module list to the mapped module name, for example:

    1. ‘MODULE_ALLOW_LIST‘ => array(‘Home‘,‘Test‘,‘User‘),
    2. ‘DEFAULT_MODULE‘ => ‘Home‘,
    3. ‘URL_MODULE_MAP‘ => array(‘test‘=>‘admin‘),

Module-mapped modules must be defined using lowercase

[thinkphp] hide the background address

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.