I want to hide and rename
wp-login.php in my URL for branding purposes on a Multisite set up.
From this forum post I see that I can change
mysite.com/login by inserting a
RewriteRule ^login$ wp-login.php in my
.htaccess. I like that the URL bar does not show login redirecting to wp-login.
If I try to login under a subsite
mysite.com/subsite1/login it shows as redirecting from
How do I get it to show as
mysite.com/subsite1/login without the redirect in the URL bar?
If I enter
mysite.com/wp-login.php it shows as page not found. Great!
Now if I enter
mysite.com/subsite1/wp-login.php it shows as the page exists. Oh no!
How do I hide that this page exists for subsites? I tried the
functions.php suggestion in my child theme but it created a redirect loop.
First things First …
The Rewrite Rule
Basically all this rewrite says is (say it out loud) … when I type
mysite.com/login and hit enter, then take the user (rewrite) to
This is not a URL mask or URL Forwarding which is what you are hoping for.
Second Part …
After Login – Redirect too
The url your are seeing contains 2 parts
&redirect_to=%2Fsubsite1%2Floginis fairly obvious as where to GO after logging in successfully.
Hiding that you’re using WordPress
It’s probably better that your customers know that you have white labelled WordPress … it would give more confidence that their CMS is a trusted open source application used by tens of millions of people around the world. Don’t hide it 🙂
I found this article a good reference and will be rolling out a few of the techniques and updating some old practices, based on the info within.
For re-writing login URL, Checkout Stealth login – I haven’t used it so not sure if it works in a Multi-site but could be worth checking out.
And if your clients are worried about seeing WP in the URL, using Roots theme (or at least checking out its functions, could be handy too) http://www.rootstheme.com/