Skip to content

Ninja Cloud Host

small. simple. clean.

  • Home
  • About
  • IT Services
  • Contact

How to use .htaccess to Rename the login directory or page of a Website

How to use .htaccess to Rename the login directory or page of a Website

Posted on October 13, 2014January 17, 2022 by Ninja

The URL layout configuration with the mod_rewrite (the apache module that handles URL rewriting) in the .htaccess file can be changed.  This is very common with CMS systems like WordPress that have a specific path and you want to rename it.


RewriteRule ^login/?$ /wp-admin.php [QSA,L]
RewriteRule ^login/?$ /wp-login.php [QSA,L]

This will basically translate any request to /admin/… into /wp-admin/ or
to /login in to /wp-login.

This only rewrites the URLs that get requested. Users, Bots and other crawlers will still output the same configuration and it will not hide the fact that you have a wp-admin or wp-login to change it.  It just makes your life a little easier when you don’t have to type in extra characters to login to the backend.

Posted in Blog, Web HostingTagged admin, apache, change, htaccess, login, rename, url, wordpress, wp-admin

Post navigation

How to Forward your email to your Gmail account with CPANEL
Secrets of the Javascript Ninja


"We are all now connected by the Internet, like neurons in a giant brain."

- Stephen Hawking

Sitemap

  • About
  • Blog
  • IT Services
  • Contact
  • Testimonials

Social

Priacy Policy | Terms and Conditions

Ninja Cloud Host | PO Box 861662 | Los Angeles, CA 90086-1662

designed by ken.