Seems easy enough... just use the WordPress Rewrite API to change
mysite.com/login/ into mysite.com/wp-login.php
(This would make things a lot easier for new WP users to get to their dashboards.)
Ozh's plugin works nicely for regular WP, but getting it to work on MU to be a common problem. If you read the comments on Ozh's plugin post, there are lots of MU users having issues getting it to work.
I'd like to request a multisite-compatible version of this plugin. WPMU DEV has the technical knowhow to get these rewrite rules working for multisite networks.
I have tried Ozh's plugin on both our production server (Nginx, multisite) and my local MAMP install (multisite). Neither worked. I'm getting 404 errors when trying to access mysite.com/login/
Seems easy enough... just use the WordPress Rewrite API to change
mysite.com/login/ into mysite.com/wp-login.php
(This would make things a lot easier for new WP users to get to their dashboards.)
Ozh's plugin works nicely for regular WP, but getting it to work on MU to be a common problem. If you read the comments on Ozh's plugin post, there are lots of MU users having issues getting it to work.
I'd like to request a multisite-compatible version of this plugin. WPMU DEV has the technical knowhow to get these rewrite rules working for multisite networks.
I have tried Ozh's plugin on both our production server (Nginx, multisite) and my local MAMP install (multisite). Neither worked. I'm getting 404 errors when trying to access mysite.com/login/
Cool, thanks for the suggestion. Someone should be along shortly to give their opinion from staff however lets also see what members think... any more +1s?
Aaron's having a well deserved break, and I'm beasting all our other developers (who aren't also on holiday) with a billion other things, maybe in a few weeks but not before I'm afraid :/
Also, there's a nasty tendency for us to get badmouthed every time we do a better version of another plugin... having said that though you;re right, this should be a nice easy one to knock out, and a generally good improvement to MS too!
Also, there's a nasty tendency for us to get badmouthed every time we do a better version of another plugin... having said that though you;re right, this should be a nice easy one to knock out, and a generally good improvement to MS too!
I hear ya, but it's nothing a little positive PR couldn't fix. In this particular case, there is a good amount of evidence to show that the current plugin doesn't work for most (or perhaps all) MU installations.
Suggestions:
1. Give Ozh a mention or some credit/attribution on the plugin -- "based on the great tutorial/plugin Ozh wrote"
2. Consider releasing it for free on the regular WP plugin directory
Oh, and thanks in advance if you guys decide to develop this little plugin. IMHO, this will make it much easier for MU admins to teach their clients to login to their sites... and hopefully prevent all those emails like:
"Hey, I lost that login link to my site again... What was it?"
1445 pointsLike some sort of WPMU DEV GodMindblowingly helpful memberLifetime member
Lifetime Member
—
8th August 2011 (9 months ago)
#
Until this plugin request becomes real ;)
Here is something I am using to force redirect to mydomain.com/login/
/* Usage: create page called login. Use login shortcode to create login form. Code will redirect users to new login page */
add_action('login_init', 'redirect_login');
function redirect_login() {
global $action;
if (empty($action) || 'login' == $action) {
wp_safe_redirect('http://mydomain.com/login/');
die;
}
}
This is a temp fix until above mentioned requested plugin is realized to be able to change wp-login.php into /login/ ;)
Using WP's built in rewrites is not such a good idea because you have to flush the rules option for every single blog, which is why that plugin doesn't work.
1445 pointsLike some sort of WPMU DEV GodMindblowingly helpful memberLifetime member
Lifetime Member
—
10th August 2011 (9 months ago)
#
@gina
Congrats on becoming a lifetime member - I see the shiny new slogan :)
-----------------------
I spoke to soon. I am having issues with the redirect from wp-login.php to /login/
It works great for root...but not subsites - I suspect the issue is because I am using multisite with subfolders.
Would be great if someone with multisite subdomains set up could test. I don't have access to a subdomain multisite at the moment.
7026 pointsLike some sort of WPMU DEV GodMindblowingly helpful memberLifetime member
Lead Developer
—
10th August 2011 (9 months ago)
#
@Jonathan -- will these rules be the same for NGINX, since there's no .htacess file?
You'll have to translate into nginx specific rules.
I spoke to soon. I am having issues with the redirect from wp-login.php to /login/
It works great for root... I suspect the issue is because I am using multisite with subfolders.
Ya, rules would be different/more complex with subfolders, you would need to use a rewrite to pull the blog url part and paste into new login url. Lots of google and trial/error.
The reason I ask is that with the rewrite rule Aaron recommended, typing in domain.com/login ALWAYS takes you back to the login screen, even if you're already logged in.
If you rewrite it to /wp-admin instead, then typing in domain.com/login will take you straight to /wp-admin if you're already logged in.
1445 pointsLike some sort of WPMU DEV GodMindblowingly helpful memberLifetime member
Lifetime Member
—
12th August 2011 (9 months ago)
#
@nickd32,
Firstly is your rewrite / redirect still working?
Guess what - mine has stop working - AGAIN! lol. The rewrite rule is fine - can access wp-login.php and /login/ but the redirect just stopped working.
# Redirect for wp-login.php to /login/
Redirect 301 /wp-login.php?$ /login/
# Rewrite wp-login.php to /login/
RewriteRule ^login/?$ /wp-login.php [NC,L]
The above httaccess stuff is either working or its not and it goes from one to the other. This is mind boggling - and I am at wits end. All this for a stupid page :( *rant over* lol
If it is still working for you - that means it is my side (hoping it is my side) I've been doing loads of stuff which could have thrown it off ;)
As for your question - i think that would be asking for trouble... but rather get final word from Aaron or other dev ;)
Responses (25)
Theme Designer — 26th July 2011 (10 months ago) #
Cool, thanks for the suggestion. Someone should be along shortly to give their opinion from staff however lets also see what members think... any more +1s?
Founder & CEO — 27th July 2011 (10 months ago) #
Aaron's having a well deserved break, and I'm beasting all our other developers (who aren't also on holiday) with a billion other things, maybe in a few weeks but not before I'm afraid :/
Also, there's a nasty tendency for us to get badmouthed every time we do a better version of another plugin... having said that though you;re right, this should be a nice easy one to knock out, and a generally good improvement to MS too!
Member — 27th July 2011 (10 months ago) #
Glad Aaron's getting a little R&R !!
I hear ya, but it's nothing a little positive PR couldn't fix. In this particular case, there is a good amount of evidence to show that the current plugin doesn't work for most (or perhaps all) MU installations.
Suggestions:
1. Give Ozh a mention or some credit/attribution on the plugin -- "based on the great tutorial/plugin Ozh wrote"
2. Consider releasing it for free on the regular WP plugin directory
Oh, and thanks in advance if you guys decide to develop this little plugin. IMHO, this will make it much easier for MU admins to teach their clients to login to their sites... and hopefully prevent all those emails like:
Founder & CEO — 28th July 2011 (10 months ago) #
All true :) Can you give us a prod if we haven't looked into this in the next few weeks?
I think it'd be nice for edublogs too!
Lifetime Member — 31st July 2011 (9 months ago) #
Tammie & James: I'm a definite +1 for this ;)
And Thanks nickd32 for making a formal request.
Lifetime Member — 8th August 2011 (9 months ago) #
Until this plugin request becomes real ;)
Here is something I am using to force redirect to mydomain.com/login/
This is a temp fix until above mentioned requested plugin is realized to be able to change wp-login.php into /login/ ;)
Member — 8th August 2011 (9 months ago) #
@Jonathan -- I'll try this out. Thanks!
@James... seems people are on board with the idea of a simpler login for users. W00t !!
Founder & CEO — 9th August 2011 (9 months ago) #
@nickd32 1 x +1 hardly emphatic ;)
However, we will see if someone can knock out a quick plugin, maybe we'll nick Jonathan's code (points coming your way Jonathan!)
Lifetime Member — 9th August 2011 (9 months ago) #
Wow, thanks for the points James, and you can tell the devs they can steal away ;)
Lead Developer — 9th August 2011 (9 months ago) #
This is much better handled by a true rewrite rule in multisite, as the plugin was adapted from, something like:
RewriteRule ^login/?$ /wp-login.php [NC,L](untested)
Using WP's built in rewrites is not such a good idea because you have to flush the rules option for every single blog, which is why that plugin doesn't work.
Lifetime Member — 10th August 2011 (9 months ago) #
@Aaron,
That is the issue - lol
http://wpmu.org/daily-tip-get-a-pretty-login-url-for-wordpress/
http://wordpress.org/extend/plugins/ozh-simpler-login-url/
And Ozh's plugin is pretty much what you said and this is why we are dumb founded - with mu - It doesn't work ;)
Can't figure it out - it should work but it doesn't.
This plugin request started by nickd32 came from these topics
http://premium.wpmudev.org/forums/topic/how-to-change-login-url
http://premium.wpmudev.org/forums/topic/changing-wp-login-wp-admin
Jonathan.
Sidenote: Welcome back. Hope you had a great holiday ;)
Lifetime Member — 10th August 2011 (9 months ago) #
I thought Aaron was meant to be on holiday :P
+1 from me
Lifetime Member — 10th August 2011 (9 months ago) #
@Aaron,
Just tested your htaccess code...
RewriteRule ^login/?$ /wp-login.php [NC,L]All I'm going to say is WTF - It works! - I tried this awhile ago, and it didn't work - I swear - lol.
Okay so that solves the login rewrite.
So user can now login at either
domain.com/login/ or
domain.com/wp-login.php
Question: So now how do we redirect the wp-login.php to /login/
Jonathan.
Lead Developer — 10th August 2011 (9 months ago) #
Redirect 301 /wp-login.php /login/I think.
Lifetime Member — 10th August 2011 (9 months ago) #
Aaron,
Tried the redirect - didn't work. So tried various ways, you were close ;)
Okay Final Working htaccess edits for simplier login url
Thanks Aaron this solved it.
Jonathan
Lifetime Member — 10th August 2011 (9 months ago) #
talk about ironic.. i JUST removed ozh's plugin minutes ago because it didn't work! tried several others previous to ozh's that didn't work either.
i am going to give this a shot..
thanks! :)
gina
Member — 10th August 2011 (9 months ago) #
@Jonathan -- will these rules be the same for NGINX, since there's no .htacess file?
Lifetime Member — 10th August 2011 (9 months ago) #
@gina
Congrats on becoming a lifetime member - I see the shiny new slogan :)
-----------------------
I spoke to soon. I am having issues with the redirect from wp-login.php to /login/
It works great for root...but not subsites - I suspect the issue is because I am using multisite with subfolders.
Would be great if someone with multisite subdomains set up could test. I don't have access to a subdomain multisite at the moment.
Jonathan
Lead Developer — 10th August 2011 (9 months ago) #
You'll have to translate into nginx specific rules.
Ya, rules would be different/more complex with subfolders, you would need to use a rewrite to pull the blog url part and paste into new login url. Lots of google and trial/error.
Lifetime Member — 10th August 2011 (9 months ago) #
Sounds like fun - good thing I only need it to work on root with subfolders setup ;) Aren't I so lucky - lol.
@nickd32,
What Aaron said. And I haven't a clue - I am a newbie with nginx too. That is part of the problem - lol
But the converter says this:
rewrite ^/login/?$ /wp-login.php last;Lifetime Member — 10th August 2011 (9 months ago) #
hi jon.. thanks!!! :) i sent you some rep points for the fix.. came at just the right time!
gina
Sales & Support Lead — 10th August 2011 (9 months ago) #
Yet another thread favorited thanks to Jonathan. I may need to give him his own sub-folder... :)
Nicely done.
Lifetime Member — 11th August 2011 (9 months ago) #
@gina,
Glad it works for you - in was a tag team effort, Aaron being the brains, and Aaron being the brains - lol - thanks for rep points :)
@masonjames,
Lol - Thanks :)
Member — 12th August 2011 (9 months ago) #
Any reason you guys would recommend rewriting to /wp-login.php (as opposed to rewriting to /wp-admin) ??
Something like this...
The reason I ask is that with the rewrite rule Aaron recommended, typing in domain.com/login ALWAYS takes you back to the login screen, even if you're already logged in.
If you rewrite it to /wp-admin instead, then typing in domain.com/login will take you straight to /wp-admin if you're already logged in.
Lifetime Member — 12th August 2011 (9 months ago) #
@nickd32,
Firstly is your rewrite / redirect still working?
Guess what - mine has stop working - AGAIN! lol. The rewrite rule is fine - can access wp-login.php and /login/ but the redirect just stopped working.
The above httaccess stuff is either working or its not and it goes from one to the other. This is mind boggling - and I am at wits end. All this for a stupid page :( *rant over* lol
If it is still working for you - that means it is my side (hoping it is my side) I've been doing loads of stuff which could have thrown it off ;)
As for your question - i think that would be asking for trouble... but rather get final word from Aaron or other dev ;)
Become a member