自定义WordPress登录页面和注册页面的URL?


11

我已经安装了多站点。我已经使用Whitelabel-CMS插件为其添加了白标,但是我无法自定义注册页面和登录页面的URL。

我可以更改多站点登录页面的URL吗?我想更改注册,登录和注册页面的URL。

您能帮我自定义这些URL吗?有这种可能性吗?

更新:我已经更改了.htaccess文件,如下所示:

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^login$ /wp-login.php [L]
RewriteRule ^signup$ /wp-signup.php [L]
RewriteRule ^register$ /wp-register.php [L]
RewriteRule ^index\.php$ - [L]

# uploaded files
RewriteRule ^files/(.+) wp-includes/ms-files.php?file=$1 [L]

RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
RewriteRule . index.php [L]
</IfModule>

我不确定下一步该怎么做。



1
我三个月前试过了。我停用了它,因为如果我使用它会遇到一些错误。而且该插件暂时没有更新。
user391 2010年

Answers:


7

您可以使用htaccess文件重命名登录和注册地址,以使版本更容易记住:

http://wpguy.com/articles/an-easy-to-remember-login-address/

使用该链接中的内容,我们可以将简单的登录地址进一步扩展为简单的注册和简单的注册地址,如下所示:

RewriteRule ^login$ /wp-login.php [L]
RewriteRule ^signup$ /wp-signup.php [L]
RewriteRule ^register$ /wp-register.php [L]

记住这些需要在RewriteBase /声明后直接去


我会尝试的。如果替换URL,将来是否有任何插件出现错误的可能性?
user391 2010年

我添加了将代码添加到.htaccess文件。但是没有任何变化。我需要用新名称创建新文件吗?
user391 2010年

不,您不需要新文件,如果您已阅读我链接到的页面,将会发现这不是您需要做的所有事情,您需要将它们放置在RewriteBase之后的ifmodule部分中
Tom J Nowell

@ user391:当然,如果将其添加到.htaccess文件中,则该链接http://www.example.com/login将等效于http://www.example.com/wp-login.php,但是WordPress不知道该漂亮的表单存在。因此,您必须自己更改登录页面链接
Jan Fabry'9

我已使用在此问题中更新的代码更改了htaccess文件。但不确定如何继续操作。
user391 2010年
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.