Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- FUNCTIONS:
- add_filter('site_url', 'wplogin_filter', 10, 3);
- function wplogin_filter( $url, $path, $orig_scheme )
- {
- $old = array( "/(wp-login\.php)/");
- $new = array( "access");
- return preg_replace( $old, $new, $url, 1);
- }
- //your new codes
- add_action('init','my_redirect');
- function my_redirect(){
- global $pagenow;
- if( 'wp-login.php' == $pagenow) {
- wp_safe_redirect('404.php');
- //Don't forget to exit() becuse wp_redirect doesn't exti automatically
- exit();
- }
- }
- HTACCESS:
- RewriteRule ^access$ wp-login.php [NC,L]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement