Reputation: 21
I cannot login to the admin account on my wordpress site from the normal link: https://www.my_site.com/wp-admin. Every time I load https://www.my_site.com/wp-admin in the browser, the URL is rewritten to this URL:
https://www.my_site.com/wp-login.php?redirect_to=https%3A%2F%2Fwww.my_site.com%2Fmy_subdirectory%2Fwp-admin%2F&reauth=1
(NOTE, in the re-written URL above, "my_subdirectory" is the subdirectory under root where my wordpress site exists). When I enter the admin login credentials, the login page reloads and the URL stays the same in the browser. I'm stuck in this loop.
Here are the strange things:
https://www.my_site.com/wp-login.php?redirect_to=https%3A%2F%2Fmy_site.com%2Fmy_subdirectory%2Fwp-admin%2F&reauth=1
https://www.my_site.com/wp-login.php?redirect_to=https%3A%2F%2Fwww.my_site.com%2Fwp-admin%2F&reauth=1
https://www.my_site.com/wp-login.php
I have also followed the wordpress conventions for having the wordpress set in its own directory here: https://wordpress.org/support/article/giving-wordpress-its-own-directory/ And, my .htaccess file mimics the one shown on that page:
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{HTTP_HOST} ^(www.)?example.com$
RewriteCond %{REQUEST_URI} !^/my_subdir/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /my_subdir/$1
RewriteCond %{HTTP_HOST} ^(www.)?example.com$
RewriteRule ^(/)?$ my_subdir/index.php [L]
</IfModule>
I would really like to have the Wordpress site settings include the "www." part of the site URL and I would like to login to my admin account from "www.my_site.com/wp-admin".
Can someone please help?
Cheers!!
Upvotes: 1
Views: 7572
Reputation: 1
It also worked for me removing wp-cerber, in this case I just renamed the folder and it worked!
Upvotes: -1