admin管理员组

文章数量:1122832

I have a new install of WordPress on my Mac mini server. The site uses SSL and has a valid up to date certificate from StartCom.

The site loads, but with no CSS or theme.

Mainly, I can't get into wp-admin (or wp-login.php) as it redirects with two 301 redirects and then multiple 302 redirects. I used to find out what was happening, but now I don't know how to fix the redirects.

Here is my .htaccess

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
RewriteCond %{HTTP:X-Forwarded-Proto} !https
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

I have a new install of WordPress on my Mac mini server. The site uses SSL and has a valid up to date certificate from StartCom.

The site loads, but with no CSS or theme.

Mainly, I can't get into wp-admin (or wp-login.php) as it redirects with two 301 redirects and then multiple 302 redirects. I used http://redirectdetective.com to find out what was happening, but now I don't know how to fix the redirects.

Here is my .htaccess

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
RewriteCond %{HTTP:X-Forwarded-Proto} !https
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
Share Improve this question asked Jan 15, 2016 at 18:19 DennisDennis 211 gold badge1 silver badge2 bronze badges
Add a comment  | 

4 Answers 4

Reset to default 0

I think you want to force everything to go over https, is that right?

If so I'd remove your rewrite rule, make sure that that allows you to access admin (over http) and then use the WordPress HTTPS (SSL) plugin instead. It allows you to configure how SSL is used by WordPress, and I think you will find it easier to manage.

I had an issue similar to this where I had multiple 302 redirects for getting into the wp-admin pages. In the end the problem was after a migration the permissions had somehow changed. Ensure the wp-admin directory is executable.

Mostly its a folder permission issue, change "wp-admin" folder permeations to be 777 and then test admin interface if it works undo permeations changes to 755 test again it should works fine,

Try these

  • Remove the htaccess rules
  • Make sure wp-admin works on http
  • change your site and home url and add https://

This should work for you, try and inspect the page and see what errors are there in the console for ex. which requested urls or resources are giving you those nasty redirects.

本文标签: wpadmin 302 redirects