magento安全 修改后台路径/改变后台地址

为了安全考虑, 相信很多人都会想修改Magento默认的后台地址/admin

下面记录一下如何改变Magento的后台访问路径。

System - Configuration - Advanced - Admin - Use custom admin URL 设为YES

Custom admin URL 填入要改的后台路径,比如newadmin

另外修改:/app/etc/local.xml文件

找到<frontName><![CDATA[admin]]></frontName>,将admin改为newadmin

清空var/cache 和 var/session,OK。

 

出现问题报错的话检查以下:

select * from core_config_data where path='admin/url/custom'; -- should be http://www.yourdomain.com/newadminpath
select * from core_config_data where path='admin/url/use_custom'; -- should be: 0
select * from core_config_data where path='web/secure/base_url'
select * from core_config_data where path='web/unsecure/base_url'; -- should be: http://www.yourdomain.com/

 
原文地址:https://www.cnblogs.com/zhouwenwu/p/2464810.html