• Resolved lucas13

    (@lucas13)


    Hello,
    I have a webserver with two seperate wordpress installations, both with valid working SSL.
    On one, it works great: the site is set as https:// but https:// works fine too.
    On the other, it doesn’t work properly. When the sure url is set to http:, http: is fine, but going to https:// address attempts to load the css and other stuff from the http: domain. Changing the site url and home to https: doesn’t help as it still tries to load css from http: (but links point to https??), and I also can’t log in as it causes a redirect loop. I’ve left it like this for now and you can view it here.

    This is a totally clean installation of WordPress (no plugins, default theme), so I’m not sure what the problem is. Any suggestions? I posted the .htaccess below, but it’s pretty normal. Thanks!

    .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>

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter lucas13

    (@lucas13)

    Figured this out.
    I was using nginx as a reverse proxy for Apache.
    Turns out that when it was getting an https hit and passing it to apache, it wasn’t setting a certain header “X-Forwarded-Proto” so wordpress’s is_ssl() function wasn’t recognizing the ssl.

    I added proxy_set_header X-Forwarded-Proto $scheme; to my nginx config, which solved all the problems.

    Alex

    (@graphicfusion)

    Thank you for posting this fix, i had the same issue just recently.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Switching to https:// causes loging redirect loop, mixed content’ is closed to new replies.