The comment by ‘warm_tape’ is correct. Use home_url(), then put a die() after the wp_redirect to ensure that the accessed page will ‘die’ and not interfere with your main page.
Related Posts:
- Is there any way to rename or hide wp-login.php?
- Increase of failed login attempts, brute force attacks? [closed]
- How to fake a WordPress login?
- Brute force attack?
- Stop users from logging in from multiple locations
- Receiving “This content cannot be displayed in a frame” error on login page
- Websites defaced by uploading script using theme editor
- Make wordpress admin failed login attempt return 401
- advance membership managment
- WordPress login urls
- Store brute-force IP addresses
- How to create a private login page for admin.?
- WordPress Security – How to block alternative WordPress access
- Protecting WordPress login page
- wp-admin folder, brute force, and password protection
- Sniffing wordpress user’s credentials
- disable site_url redirect in wp-login.php
- Does WordPress (or a plugin) reveal login credentials to admin?
- Is wp_login_form secure on a non secure page?
- WordPress login security
- Why isn’t the login page rate limited by default?
- How can I password protect a WordPress site without requiring users to log in?
- Input sanitation
- How to Prevent Brute Force Attack on WordPress
- Where is the php file, that does the checks for login information?
- Error on WordPress Login
- Access log “POST /wp-login.php HTTP/1.0” 400
- force login loophole
- I need to find which is the file that checks the DB for correct login (username, password)
- Membership Plugin with Facebook integration [closed]
- How to create separate login for authors/moderators/subscribers?
- How to invalidate `password reset key` after being used
- Site is not loading after relogin attempts on SSL
- Some crawlers/bots attempting to login with very good guesses. How?
- User login without username, only password
- Hide wp-login.php but not the widget
- How login is possible, if I deny login page via nginx?
- Username character requirements
- Action wp_login_failed not working if only one field is filled out
- Intentionally Force Failed Login WordPress
- What hooks should I use for pre-login and pre-registration actions?
- how to update current logged user username
- Custom Reset Password & Forgot Password Front End Forms
- Admin user getting message ‘You need a higher level of permission’
- woocommerce and is_user_logged_in() if not redirect to homepage
- Remove WordPress Login Animation
- Redirect users to a front end wp login page
- How can I allow access to multiple users, using the same login, at the same time?
- Deny a user role to log in after register
- wp_get_referer not working properly after wp_redirect
- Login Button CSS
- Force Users to Login – loop problem
- How do I replace “Username” in the WordPress login form?
- How can I do a URL redirection when an user uses wrong login details?
- Show errors on custom login form [duplicate]
- Change login_message using title
- Changing WP login credential [closed]
- Facebook and WordPress
- How can I remove “Powered by WordPress” pop-up disclaimer in wp-login.php?
- User needs to login first before accessing website
- Redirecting after login?
- Changed the url into https and now can’t access site admin
- Can’t log in. WordPress says my account doesn’t exist [closed]
- Form Action submit over https
- How do I add Login fields and registration link to the header?
- How to make a user be able to register if such a login already exists?
- Can not login to wordpress site after resolving white screen of death
- add_action(‘init’) not work
- Password not resetting on wordpress?
- Why there is a 302 status when my account and password are right?
- 503 Login WordPress [closed]
- Password recovery URL has error – but not found in code or db
- Cannot Get User id after login success in file wp_login.php
- If I use an alternative login (e.g. CAS or other SSO) plugin, is my site protected from the recent brute force login attempts?
- This webpage has a redirect loop issue
- Create front end member login
- Logging in to the frontend works correctly but not for WP-Admin
- I can’t access my wp-admin dashboard
- Cannot login to WordPress on one device: login refreshes/an error was encountered whilst trying to authenticate
- Make an order of products without login
- Updated : how to make email optional while user registration using default wordpress form
- I can’t log in to `wp-admin` after changing my domain
- My wordpress site crashes when I login!
- End session screen not close automatically after login
- Unable to login with email address as the username – WordPress
- Using WordPress login for a non word-press website
- Using is_user_logged_in() to lock down whole site
- https rewrite not working for All in one security Brute force > rename login url
- Issue logging in from second computer
- WordPress auto login user after registration only from a specific page
- Custom Field For Login
- Opening protected page with cookie?
- wp_lostpassword_url not escaped
- Directory authentication initially succeeded, but no valid profile was found (“get entries” procedure)
- External Authentication
- Login to wordpress with filezilla client [closed]
- I can’t login to wordpress dashboard without SSH
- Member Area Login with Fail Message
- How to Find WordPress site has backdoor login Codes
- Entire WordPress content disappears