Instead of filtering the site_url
you should be filtering adim_url
and login_url
add_filter('admin_url', 'new_admin_url');
function new_admin_url()
{
// Insert the new URL here:
return get_bloginfo('url').'/controlpanel/';
}
add_filter( 'login_url', 'new_login_url', 10, 2 );
function new_login_url( $login_url, $redirect ) {
return get_bloginfo('url').'/access/';
}
And combine with the Rewrite Rules and redirections in the .htaccess. For example, for the wp-login.php (I’m not a mod_rewrite expert, so it is really possibly the next code doesn’t work or need some modifications):
// Internal Rewrite from access to wp-login
RewriteRule ^access(.*)$ wp-login.php$1 [NC,L]
// Real redirection from wp-login to access appending the query string
RewriteCond %{REQUEST_URI} ^wp-login.*
RewriteRule ^ access$ [R=301,NC,QSA,L]
Related Posts:
- In Django, how do I know the currently logged-in user?
- Disallow user from editing their own profile information
- wp_signon returns user, but the user is not logged in
- What exactly is ReAuth?
- What are the differences between wp_users and wp_usermeta tables?
- How can I send a welcome email to a user AFTER they login for the first time?
- Can not login with correct username and password
- How to remove the WordPress logo from login and register page?
- Stop users from logging in from multiple locations
- My login form does not work
- Cookie settings for session across WPML subdomains using custom AJAX login
- Change Login Page for a Multisite Subsite
- Change admin login URL
- Is there a way to remove wp-login.php alias (login)?
- Login with cookie but without using WordPress code
- wp-admin redirecting to wp-login.php
- Get wordpress stored cookies for custom login
- Restrict PDF links
- Can’t access login page after password reset
- Remote REST request to check login status
- How can I test the login for an expired session?
- Rendering of custom walker menu function not working properly
- Force user to login in home page
- Login as a client no dashboard menu?
- Allow access to a page for admins only
- How to edit comment_reply_link
- Right practice to edit WP reset password email
- deny IPs from wp-login using .htaccess
- How To Change Wp Register/Login URL Permanently To My Custom Page
- How can I prevent my custom form from redirecting to wp-login?
- Custom Login iframe doesn’t work
- wp-admin returns 404 [closed]
- What would be the best way to implement Magic Link logins in WordPress?
- Can’t login to WordPress without hitting the Remember Me checkbox. Potential SSL implementation bi-product
- disable site_url redirect in wp-login.php
- Forgot password needs to redirect from wp-login to a custom page
- Is it possible to designate the login.php as homepage?
- Force login for a subdirectory within wordpress install
- Auto login between word press subdomain and a .net website
- Redirect login page except on reset pass
- Redirect users after failed login attempt?
- How to secure files based on format and word in file name with wp-config or htaccess?
- Redirect to custom variable
- Get the url of custom login page in the registration page
- WordPress error on log out ‘Not Permitted’ and can’t log out
- How can I change the email sender name from wordpress to (myblogname) on the “lost password” email?
- Changed primary domain and now wordpress login won’t work
- Add logout link when logged in, make it disappear when logged out?
- Keep user session with custom implementation of user login
- Forcing frontend login with UI switch
- Sidebar login widget with error print, returns an error
- Login without Password
- Exclude login page from custom maintenance code
- Temporarily locked out … how long is a “short while”?
- Change default login auth
- How do I limit access to wp-admin to an IP range?
- I can’t access my WordPress dashboard – shows Warning message [closed]
- Add html to wp_login_form
- Access log “POST /wp-login.php HTTP/1.0” 400
- Are login functions considered part of the WP backend?
- SQL – Remove All The Users and Create A New User With Admin Role Via PhpMyAdmin
- Can I protect a type of content site-wide with a single password?
- Sign in with social media accounts without creating a WP account [closed]
- WordPress login form script
- WordPress authentication using custom php?
- what is the best and safest way to allow users to register to site
- ERROR: Cookies are blocked due to unexpected output (no FTP access)
- Sharing a logged in session with a custom subdmain site?
- How do I change the language of the login page to Arabic?
- MAMP localhost wordpress site, not possible to sign in, username and password are correct
- Login issues wordpress page
- How to post frontend login form to a different authentication script from wp-login?
- Make WordPress User Name be the Company Name when Registering (not the default ‘first name’ last name’ email address’)
- Why do I have a reauth=1 redirection loop when I try to log in to WordPress hosted on AWS Fargate?
- Login form does not store/remember/suggest users password
- Problem with is_user_logged_in() function in some pages
- Confused – can’t access wordpress dashboard or site that has been published
- wordpress login loop and session problem
- unable to Login to Admin
- WordPress login loop on proxy setup with SSL – Apache proxy to IIS
- ERROR: Cookies are blocked due to unexpected output – ultimate solution
- Android app – can’t login: “This site already exists in the app, you can’t add it”
- Fatal error: Call to undefined function get_plugin_data()
- backend access per user status
- Make WordPress User Name the Email Address When Register
- Users redirected to old site
- WordPress Login / SSL = Code Question
- Save user login date
- Login with Username (or Code) only
- Enqueue script on logon failure
- I get 404 when I try to login ever since I changed the permalink
- wp_signon gives error insufficient_permissions
- Is there a way to give users the option to log in to their favorite group on login? [closed]
- Logging in takes a few refreshes to show you are logged in, is this a cache issue? [closed]
- Direct access to site when log in
- Can not login after moving to cloudflare and adding rules
- Inconsistent login state
- Can i hide a dynamically created div to logged out users?
- Why am I not able to login to the admin
- WP behind haproxy weirdness