title: Hide wp-login.php as log-in and redirect it to a custom login page
body: <p>I'm trying to hide the wp-login.php on my site so I installed the plugin Rename wp-login.php, I renamed it as log-in. Now I want to redirect it to my custom login page so the default login form of wordpress is totally hidden. Is there a way to accomplish this? I have already tried a redirection plugin and the code below however it only supports the wp-login.php and not my new login url:</p>
  
  <pre><code>function redirect_login_page(){
  
  // Store for checking if this page equals wp-login.php
  $page_viewed = basename( $_SERVER['REQUEST_URI'] );
  
  // permalink to the custom login page
  $login_page  = get_permalink( '10' );
  
  if( $page_viewed == "wp-login.php" ) {
      wp_redirect( $login_page );
      exit();
  }
  }
  </code></pre>
  
  <p>Is there a way to do this without actually altering the wordpress base files?</p>