修改wordpress登录地址和后台地址

先下载并安装一个名为Hide Login+的插件。插件的原理其实帮你修改.htaccess文件,通过url rewrite来改写原来的地址

RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteRule ^admin$ admin/ [R,L]
RewriteRule ^login/?$ /wp-login.php [QSA,L]
RewriteRule ^admin/(.*) /wp-admin/$1?%{QUERY_STRING} [QSA,L]
RewriteRule ^register/?$ /wp-login.php?action=register [QSA,L]
RewriteRule ^forgot/?$ /wp-login.php?action=lostpassword [QSA,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]

有login slug, logout slug, admin slug, register slug等4个地址可以改写。修改完成后点击底部的save changes。使用起来非常简单。

微信扫一扫,分享到朋友圈

修改wordpress登录地址和后台地址
返回顶部

Optimized by WPJAM Basic

显示

忘记密码?

显示

显示

获取验证码

Close