为wordpress设置一个简单的后台登陆地址

  • 时间:2020-05-29 14:26:07
  • 分类:网络文摘
  • 阅读:139 次

wordpress默认的仪表盘实际登陆地址是 http://yoursite.com/wp-login.php。如果wordpress是安装在子目录中,实际登陆地址就是像 http://yoursite.com/子目录名/wp-login.php 这样的形式。想让登陆地址变得更简捷,如:http://yoursite.com/login 这样的形式,可以通过为.htaccess增加一条重写规则来实现。方法如下:

为wordpress设置一个简单的后台登陆地址

为wordpress设置一个简单的后台登陆地址

在本地打开.htaccess文件,添加如下规则:

  1. RewriteRule ^login$ http://yoursite.com/wp-login.php [NC,L]

之后,保存并重新上传.htaccess文件,使用 http://yoursite.com/login 来登陆后台,会自动跳转到wordpress的实际登陆地址。

说明:如果wordpress安装在子目录,别忘了更改规则中的网址为http://yoursite.com/子目录名/wp-login.php。

原文:http://digwp.com/2011/01/simpler-login-url/

推荐阅读:
5 Things Beginning Bloggers Struggle With the Most  Win the “Integral” WordPress Theme from Themely  7 Habits of Highly Productive Bloggers  How a Business Owner Builds Relationships With Influential Blogg  5 Promising Tools to Help Boost Your Online Startup  How to For-Loop and do Math/Arithmetic Operations in Windows/NT   How to Find the Closest Sum of Three in an Array using Two Point  The Lazy Singleton Design Pattern in Java  How to Find out the Most Frequent Subtree Sum using Depth First   A Microsoft Coding Interview Screening for Position Principal So 
评论列表
添加评论