I use a login/register plugin and display the forms on a custom page. So I try to find a solution to disable, or even better, redirect URL such as example.com/wp-login.php, example.com/register (which is the Buddypress register page), example.com/wp-login.php?action=lostpassword to example.com/login-register/

I've tried this in htaccess but it doesn't worked out.

Redirect 301 "https://example.com/register/" "https://example.com/login-register/"

Any idea? Thanks.

1 Answer 1


Here is the right answer :

Redirect 301 /register /login-register

It works without quotation marks.

And no need to use absolute path (the entire address), except if the redirection goes to another domain. If this is your case, do this:

Redirect 301 /register https://example.com/login-register

Also, I didn't redirect /wp-login as it caused some issues (inability to log in)

FYI : 301 = permanent redirection, 302 = temporary redirection


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.