Wordpress wp-admin redirect loop, yet again

前端 未结 3 1660
日久生厌
日久生厌 2021-01-12 01:24

I realize this question has been asked many times before, but I think my problem is unique (but don\'t we all think that?... /philosophy)

My site is getting a redire

相关标签:
3条回答
  • 2021-01-12 01:28

    I was able to solve this by simplifying my sites-available configurations. This is what I used:

    <VirtualHost *:80>
        ServerName     example.org
        ServerAlias    example.com
        ServerAlias    example.net
        DocumentRoot  /var/www/example.org/site
    
        DirectoryIndex  index.php index.html
    
        <Directory /var/www/example.org/site>
            Options Indexes FollowSymLinks ExecCGI
            AllowOverride All
            Require all granted
        </Directory>
    
        ErrorLog  ${APACHE_LOG_DIR}/example_error.log
        CustomLog ${APACHE_LOG_DIR}/example_access.log combined
    
    </VirtualHost>
    

    And now there is no redirect when accessing wp-admin!

    0 讨论(0)
  • 2021-01-12 01:36

    I fixed by changing all file permissions in wp-admin from 777 to 644, folders 755. Check your permissions

    0 讨论(0)
  • 2021-01-12 01:43

    OK lets try some stuff here:

    1. Why do you have siteurl http://example.com/site in your DB when ServerName www.example.com ? If site folder is like public it should not be accessible by URI. So your 'site URI' and 'home' should be http://example.com

    2. Are you're trying to rewrite http to https here:

      RewriteCond %{HTTP_HOST} ^example.com RewriteRule ^(.*)$ https://www.example.com%{REQUEST_URI} [R=301,L]

    Why? Could you please remove it and then check ?

    If it doesn't helps, please check apache error.log and print here the output.

    Thanks

    0 讨论(0)
提交回复
热议问题