Wordpress wp-admin infinite redirect loop

2019-07-29 12:32发布

问题:

I'm having problems with a wordpress site to enter the admin area.

If I enter with: http://www.example.com/wp-admin/

I get an infinite redirect loop but if I enter with:

http://www.example.com/wp-admin/index.php

it works

回答1:

As /wp-admin/ have a infinite loop redirect but /wp-admin/index.php works we could solve it by adding

RewriteEngine On
RewriteBase /
RewriteRule ^wp-admin/$ /wp-admin/index.php [R=302,L]

in the .htaccess before the WP-rules.

However, this is not the best solution, it works.



标签: php wordpress