Sometimes I find it pretty hard to type my WordPress Admin URL… you know “http://blogaddress.com/wp-admin.php” or “http://blogaddress.com/wp-admin/“… that’s too many dashes, points and slashes for my taste :-D.
If your server supports mod_rewrite (most servers do), you can shorten your login URL to just “login” by adding this rewrite directive to the .htaccess file in your blog directory:
RewriteEngine On RewriteBase / RewriteRule ^login$ /wp-login.php [L]
But wait, if your blog’s permalink structure is set to “pretty” permalinks, then, your .htaccess file has some rewrite rules already, in that case just add the RewriteRule directive right after the “RewriteBase /”. Like this:
RewriteEngine On RewriteBase / RewriteRule ^login$ /wp-login.php [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L]
Make sure you save a back-up copy of the original .htaccess file (if there was one) before making these changes. You can never be too careful.
Also, make sure there isn’t a “login” directory.
Not only for WP bloggers but for all PHP developer, thanks for it
Статеечка на высоте +100
[…] bien, para complicar algo las cosas, pero de un modo mas geek si se quiere, hace poco leí por ahí un modo de facilitar la entrada a tu blog usando las virtudes de mod_rewrite (si tu servidor la […]
I simply write wp-admin for entering…
thank u m8 very useful it works perfectly
Works perfectly dude ..
thanx
This is AWESOME — thank you so much.
One question: how do you mask the URL when someone logs out? It seems like the addition of the ?loggedout=true breaks the rewrite rule…
Thanks mate, this what I was looking for. Very clean a nice example.
thanks for sharing!!! 😀
Hello my family member! I wish to say that this article is amazing,
great written and come with approximately all vital infos.
I’d like to look extra posts like this .
“http://www.happynewyear2016imageswallpapers.com/2015/11/new-year-greeting-wishes-2016/”
I never though of changing the default login URL. You give me a new way to make my site more awesome.
Comments are closed.