thinkphp6 method to hide the admin login entrance: 1. Modify the value of deny_module_list; 2. Change admin in admin.php to any random string.
#The operating environment of this article: Windows 7 system, thinkphp v6 version, Dell G3 computer.
How to hide the admin login in thinkphp6?
ThinkPHP specific steps to hide the backend address
1. Modify the value of deny_module_list in application/config.php on the homepage, where the default There is already common, we add admin and change it to ['common', 'admin']
2. Then create a new admin.php in the public directory of the project and rename it admin_d75KABNWt. php, we can change admin in admin.php to any random string, the longer the better.
3. Log in to the backend. After the above modifications, we can no longer log in to the backend through www.test.com/admin. At this time, we can use www.test.com /admin_d75KABNWt.php, where admin_d75KABNWt.php is the name we can modify arbitrarily.
Note: Please protect your backend login entry and do not paste it everywhere. If there is a leaked backend entry, please try to modify it again.
Other security suggestions for ThinkPHP
Through the above hidden backend entrance address, we have added the first door. The following is for Everyone’s security suggestions will help us add more security protection to our backend.
1. Regularly modify the login entrance and super administrator password of the background management. The more complex the better.
2. Enable the background login verification code. How to enable it: modify login_captcha at the bottom of application/config.php and change its value to true
3. Modify the background super administrator username. Everyone is accustomed to using admin. It is recommended to change it to another name.
Recommended learning: "The latest 10 thinkphp video tutorials"
The above is the detailed content of How to hide the admin login entrance in thinkphp6. For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

SublimeText3 English version
Recommended: Win version, supports code prompts!

SublimeText3 Mac version
God-level code editing software (SublimeText3)

DVWA
Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software

Safe Exam Browser
Safe Exam Browser is a secure browser environment for taking online exams securely. This software turns any computer into a secure workstation. It controls access to any utility and prevents students from using unauthorized resources.

mPDF
mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),
