• scsmash3r

    (@scsmash3r)


    If you want to hide your wp-admin link and use some else path to reach your admin page, use this one method (I also tried these methods, but they are all having some innacuracies. So, here is my approach.

    1. Modify your .htaccess file – add this line after index.php rewrite rule:

    RewriteRule ^index\.php$ - [L]
    RewriteRule ^yoursecretpath$ wp-login.php [L,NC,QSA]

    where yoursecretpath is your path to admin panel.

    2. Modify wp-login.php file – add this code just before line 59 (where <DOCTYPE> tag starts, so to prevent headers sending error):

    <? $uri = $_SERVER['REQUEST_URI'];
    if(stripos($uri, 'wp-login') or stripos($uri, 'wp-admin') && !stripos($GLOBALS["HTTP_COOKIE"], 'wordpress_logged_in'))
    {  header("Location: /"); exit(); }
     ?>

    That’s all. Ofc, this method has it’s own innacuracies too, but it’s the easiest way to hide your wp-admin and wp-login standart links. Works fine for single bloggers, where users registration is not necessary.

  • The topic ‘Rename wp-admin without renaming it (.htaccess rewrite)’ is closed to new replies.