Modify the background logon entry address in Phpcms V9

Source: Internet
Author: User

Phpcms uses the default backend address www.xxx.com/admin.php, which is a security concern. There are two ways to change the entry address:

1. Directly change the file name of admin. php, such as admin88.php.

2. Background separation

Index. php? M = admin & c = index & a = login & pc_hash = this access is not allowed,

Only access in this way

Admin. php? M = admin & c = index & a = login & pc_hash =


First, modify index. php at the website front-end Portal.

Add the following before the previous code:

The code is as follows: Copy code

$ Go = isset ($ _ GET ['M']) &! Empty ($ _ GET ['M'])? $ _ GET ['M']: (isset ($ _ POST ['M']) &! Empty ($ _ POST ['M'])? $ _ POST ['M']: '');
If (! Empty ($ go) & $ go = 'admin '){
Header ("Location:/404.htm ");
Exit;
}

Then comment out the default header code in admin. php and replace the following code:

The code is as follows: Copy code

// Header ('Location: index. php? M = admin ');
Define ('phpcms _ path', dirname (_ FILE _). DIRECTORY_SEPARATOR );
Include PHPCMS_PATH. '../core/base. Php ';
Pc_base: creat_app ();

This achieves the backend separation, the background access address becomes the http://www.xxx.com/admin.php? M = admin.

However, you cannot log on to the background. Don't worry. There are many other places to change the address. The login form is submitted to index. php? For an address like m = admin, you can search for index. php? M = admin find a lot, replace it with a new 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.