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.