Advertisement
Guest User

twisted

a guest
Sep 17th, 2013
134
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. FUNCTIONS:
  2.  
  3. add_filter('site_url', 'wplogin_filter', 10, 3);
  4.  
  5. function wplogin_filter( $url, $path, $orig_scheme )
  6. {
  7. $old = array( "/(wp-login\.php)/");
  8. $new = array( "access");
  9. return preg_replace( $old, $new, $url, 1);
  10. }
  11.  
  12.  
  13. //your new codes
  14. add_action('init','my_redirect');
  15.  
  16. function my_redirect(){
  17. global $pagenow;
  18. if( 'wp-login.php' == $pagenow) {
  19. wp_safe_redirect('404.php');
  20. //Don't forget to exit() becuse wp_redirect doesn't exti automatically
  21. exit();
  22. }
  23. }
  24.  
  25.  
  26.  
  27. HTACCESS:
  28. RewriteRule ^access$ wp-login.php [NC,L]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement