Non-Default Permalinks causing /wp-admin/ Redirect Loop
-
For the past two months, I’ve been developing a site in a folder in my public_html/ . Currently, I have a subdomain pointing to this folder for development purposes. Later, this dev folder will be made the primary domain’s root folder.
The site was set up to use custom permalinks %post-name% with and had no problems whatsoever.
A week ago, the site suddenly decided to give me problems when trying to access https://www.mysite.com/wp-admin/ . It errors out with “Too Many Redirects” in all browsers.
However, https://www.mysite.com/wp-admin/index.php allows me to access the Dashboard and manage my site the way I always have.
I found that if I change the permalinks setting back to the default, I can access /wp-admin/ with no problems.
To test this issue, I installed a fresh copy of WordPress on an empty database and could replicate the problem. I switched the permalink structure to anything but “Default”, and I get the error when going to /wp-admin/. I then open /wp-admin/index.php and can access the Dashboard and change the permalink setting back to “Default” and the redirect issue goes away.
Besides trying to access /wp-admin/ , the site works exactly as it should with no errors.
I can access /wp-login.php with no problems at all times, but upon logging in, it directs me to /wp-admin/ which puts me right back at square one.
Other issues/resolutions similar to this were due to plugins and random custom code and all that, but for my testing I’m using default, start-from-scratch everything.
I tried modifying my .htaccess as the following with no success:
# BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule /wp-admin/ /wp-admin/index\.php [L,P] RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule>
And I’ve cleared my cookies, private browser, added the following to my wp-config.php file:
define('WP_HOME','https://example.com'); define('WP_SITEURL','https://example.com');
TL;DR: /wp-admin/ causes a redirect loop ONLY when I set permalinks to anything but “Default”.
Any help is greatly appreciated.
- The topic ‘Non-Default Permalinks causing /wp-admin/ Redirect Loop’ is closed to new replies.