Redirection depends on server configuration. You need to add
ErrorDocument 401 default
to your main .htaccess to prevent redirection.
You can refer the article Password-protect-wp-admin for more details
Related Posts:
- “Too many redirects” ONLY when trying to access wp-admin page
- Use a different domain for SSL
- Change Login URL Without Plugin
- Securing wp-admin folder – Purpose? Importance?
- Wrong canonical link on wp-admin pages
- WordPress in sub directory wp-admin problem
- Options for restricting access to wp-admin
- .htaccess rewrite rule for removing .php extension with exception of wp login and wp-admin
- Can’t access admin dashboard with wp-admin without /index.php after it
- How to change “wp-admin” to something else without search-replacing the core?
- Why should I password protect WP-Admin?
- Call to undefined function insert_with_markers
- Block access to wp-admin
- Cannot log into WordPress Dashboard after removing/adding .htaccess
- Should I add the IP of the server that hosts my sites to the list of authorized IPs in the wp-admin/.htaccess?
- Which HTTP headers to use for subdomain embedding?
- CDN + WP Admin Query – .htaccess redirection
- From 403 error to 500 internal server error
- Cannot Access Admin Area After Migration
- Wrong wp-admin URL
- How do I host WordPress on a hidden domain through a reverse proxy?
- How to Change The WordPress Login URL Without Plugin
- 404 redirect wp-login and wp-admin after changing login url [closed]
- How login is possible, if I deny login page via .htaccess with allow ip
- Redirect an entire WordPress site on a subdomain, except wp-admin
- Blank page when viewing wp-admin
- wp-admin going directly to 404
- WordPress /wp-admin redirect to wrong port in docker
- wp-admin and wp-login.php not Accessible after Cloudflare
- Disabling WP-Admin Caching in htaccess
- Limit access to wp-admin but still be able to log in from different locations?
- SSL doesn’t deliver parts of WordPress Administration Module
- Making WP Admin Folder accessable JUST under a different link
- Couple questions about .htaccess, login page, updates
- adding the category to the admin column for a custom post type?
- Change page title in admin area
- How to filter by post-format in admin?
- Uploading Images in the Link Manager
- How can I make a Live Demo of my Premium Plugin? Are there security risks?
- Share same domain for wp-admin but for different website
- How to allow users login to WP from external domain and make REST requests
- Disable wp-admin console for subscribers
- How to get the post editor and media library to respect HTTPS administration mode?
- Users are redirected to homepage instead of wp-admin
- How to show an error message after publishing a post?
- Set “Display name publicly as” to be usernames by default
- Is there a way to submit only meta box content in Post edit page
- Moving wordpress from localhost to server throws admin panel access error?
- How to disable admin flyout menus?
- 500 Internal Server Error after Register dialog, but with successful registration
- Change Dashboard url
- Users Unable to Access Dashboard/Posts/Pages
- Stop loading “collaborators” users on add new post or page?
- Prevent /wp-admin/ from redirecting to homepage?
- Password reset link becomes invalid immediately [closed]
- Get which template being in use within WordPress-admin
- special characters after saving draft interpreted as �
- WordPress and bbPress Login conflicts?
- How can I use a variable to include a linked image?
- Add css code in admin_enqueue_scripts
- Add custom list menu on Posts page in admin panel
- Does it matter if two people are using the same WordPress admin account?
- Use Password Protected Form without the use of wp-login.php
- redirect to a dedicated sign in page
- More than one admin logged in?
- Too many redirects after added SSL redirect on port 80 virtual host
- Register page in admin area
- “WordPress installations is currently out of date” problem with difficult situation [closed]
- Custom plugin admin page issues
- Making Comments, a sub_menu in admin menu
- Without using wordpress cms Is it possible to signup from my html page
- Customising Word press Admin – Add Post Page functionality to another similar page
- How to add ‘Insert HTML Table’ button to TinyMCE in admin?
- How to add custom CSS and JavaScript file for wp- admin dashboard (backend)
- GoDaddy hosting wp-admin problem
- Add custom fields to a page template, admin side
- Newly created user role not displaying on users screen
- issue with wordpress [wp-admin] redirects, when using kubernetes ingress hosting two wordpress websites using path
- Toggle between block ‘edit content’ and ‘select’ not properly working in WordPress Admin
- WordPress Admin extremely slow when other admin logged in
- WordPress Migration Post Problems
- Can’t access WP-Admin via HTTPS
- Pages in wp-admin is not found 404
- Random authentication failures on a load balanced WP setup
- Can I get programmatic access to wp-admin?
- Strange URLs admin area bug
- remove_query_arg on options.php
- wp.svgPainter cannot init error, causing issues with admin panel
- mysql_escape_string PROBLEM
- Cannot access my wordpress website
- Custom comment action
- get_current_screen – ‘Trying to get property of non-object’ error
- Added fields in quick edit screen need to update at the moment
- is_admin() triggers error
- Modify admin panel tab position
- not able to add thumbnail custom field in dropdown
- No wp-admin, wp-config, or .htaccess folder/file
- Taking over a WordPress site
- wordpress admin is broken [closed]
- Extend user search in the Wp backend area on the users.php page to allow for searching by email domain and role from the “users search” input box