• Resolved ubergiant

    (@ubergiant)


    I have the standard WP .htaccess file:

    # 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

    I’m not certain it was working in 4.2, but am pretty sure. The general settings use https://www. The WP admin redirects fine though I also use define(‘FORCE_SSL_ADMIN’, true); in the config file.

    The install is an add-on domain in a sub-directory so I’ve removed all .htaccess rules in the parent to confirm no influence.

    Given all this, all http should redirect to https but it isn’t so I’ve tried to force it with the following in the .htaccess, but even this does not work:

    RewriteCond %{HTTP_HOST} !^www\.
    RewriteRule ^(.*)$ https://www.%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
    
    #Now, rewrite to HTTPS:
    RewriteCond %{HTTPS} !=on
    RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter ubergiant

    (@ubergiant)

    Anyone else on https noticing http to https redirect issues? The home page redirects fine from the http version but every other page does not.

    Thread Starter ubergiant

    (@ubergiant)

    Got it working by moving the custom rules immediately after RewriteEngine:

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    # Rewrite to HTTPS:
    RewriteCond %{HTTPS} off
    RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
    ...

    Why this rule is even needed in WP, I have no idea.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘http to https not working in 4.3’ is closed to new replies.