Register the session through a specific file as the background entry; otherwise, the session fails to exit. You cannot log on to the background directly using the original background address. In this way, the diversity and changeable nature of the entry file name will provide a safer environment for your background login. This article uses Joomla! The background link is used as an example to explain how to "modify" our background link to make it more secure.
Principle: use a specific file to register a session for the background Portal. Otherwise, the session fails to exit. You cannot log on to the background directly using the original background address. In this way, the diversity and changeable nature of the entry file name will provide a safer environment for your background login.
1. entry File: myadmin. php (the file name can be changed at any time)
Purpose: register a session. The source code is as follows:
Copy codeThe code is as follows:
Session_name ("Zjmainstay"); // The session name can be changed.
Session_start ();
$ _ SESSION ['admin _ user'] = "Y"; // The session variable name can be changed.
Session_write_close ();
?>
[Html]
2. modify the background Portal File:/administrator/index. php (it can start with any CMS portal file)
Purpose: access through session control. The source code is as follows:
[Code]
Define ('_ JEXEC', 1); // Line 9 of the original file
Define ('Ds', DIRECTORY_SEPARATOR); // Line 10 of the original file
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.