Home > Article > CMS Tutorial > How to implement background access restrictions in phpcms
File path:/caches/config/system.php
Modification method:
Modification:
'admin_url' => ''
For example: the domain name that needs to be bound to the backend is a8800.phpip.com, then we can only access the backend through http://a8800.phpip.com/admin.php.
So this should be changed to:
'admin_url' => 'a8800.phpip.com',
Bind the domain name: a8800.phpip.com to the same directory as the website.
The a8800 here is any domain name, the more complex the better.
Function implementation method:
File:/phpcms/modules/admin/classes/admin.class.php
if(pc_base::load_config('system','admin_url') && $_SERVER["HTTP_HOST"]!= pc_base::load_config('system','admin_url')) { Header("http/1.1 403 Forbidden"); exit('No permission resources.'); }
Related Recommended: phpcms tutorial
The above is the detailed content of How to implement background access restrictions in phpcms. For more information, please follow other related articles on the PHP Chinese website!