• Well, here is another SSL problem question. I have been searching and digging and cannot find a resolution to the problem I am seeing.

    I have just migrated our old site from an older PHP ome grown site to a new WordPress site. All was going well until the SSL stuff. We have our SSL cert installed and working like a champ. It has been for a number of years, and as a means of verifying, here is a link from the old site (that is still active) displayed in http and https

    https://www.snipercentral.com/m40a1.htm
    https://www.snipercentral.com/m40a1.htm

    All working great.
    Now, notice the same page in the new wordpress site

    https://www.snipercentral.com/usmc-m40a1/
    https://www.snipercentral.com/usmc-m40a1/

    Notice that when you hit the https link, the site automagically redirects to http, but there is nothing setup in the settings in wordpress or the htaccess file that would redirect the https to http. Here is our .htaccess file for the root dir:

    # 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

    The WordPress HTTPS plugin is NOT installed. I have tried it, but its the same result, the selected pages to secure just redirect to http. So it is uninstalled right now. I have also tried using SSL for the entire site by changing the general settings for the home URLs to be https:, but I am sure most of you can guess what happens, because of the handy dandy redirection, the site goes into the infinite SSL death loop.

    I have searched far and wide and have dug into code and cannot figure this out. The last clue… is that I went into the wp-settings file and commented out the require statements for each header file (which causes the site to just display a blank page) and I was able to change to https and stay once the “widgets.php” include file was commented out and not loaded… I’m not saying its for sure something to do with widgets, but it might be a clue.

    Any help would be greatly appreciated.

    MEL

Viewing 4 replies - 1 through 4 (of 4 total)
  • This is a (good) host issue. I can assure you that when properly set up at host, the site will properly resolve to HTTPS without you having to do anything but ensure the Home and Site URL settings are at HTTPS and all links to site content, whether included in a Post or Page, or as a setting in any theme or plugin are also.

    Your host may need you to add something to the .htaccess file, for example (Do NOT add this until fully discussed with host, and it goes above the WP rules):

    <IfModule mod_rewrite.c>
    Options +FollowSymLinks
    RewriteEngine On
    RewriteCond %{HTTPS} !=on
    RewriteCond %{HTTP_USER_AGENT} ^(.+)$
    RewriteCond %{SERVER_NAME} ^snipercentral\.com$
    RewriteRule .* https://%{SERVER_NAME}%{REQUEST_URI} [R=301,L]
    #Header add Strict-Transport-Security "max-age=300"
    #Above line is to be discussed with host
    # <=== # at char 1 of line means ignore this line
    </IfModule>

    Note: There are differing ways at different hosts to handle the www part of the URL. Please ensure you are being consistent in it’s use. If the Home and Site URL are https://www.snipercentral.com/, then above will not work until you add an OR for WWW or otherwise work with host to ensure traffic to www is redirected to non www site url’s. Note the WWW is NOT needed and is typically done with DNS (which said host handles properly by just doing things right). Also, the www will not work with sub-domains and depending on a multi-site issue can also cause issues as these are technically sub-domains with rewrite rules.

    Also ensure that the full process of propagating a site to SSL is complete. It’s not immediate.

    Thread Starter melvin308

    (@melvin308)

    Pioneer –

    Thank you for the reply, I really appreciate it. I will discuss this with my host and see what they say. I have checked that HTTPS is “on” via phpinfo and I also checked that is_ssl() is returning correctly, which further points to some host issue.

    Thread Starter melvin308

    (@melvin308)

    Still trying to figure this out…

    But I just have noticed that in the “general” settings, the site and wordpress address are both set to https, but the odd thing is that when I try to change it to http, it just reverts back to https even though it says “settings saved”.

    Any ideas?

    MEL

    Please review these methods to Change the Site URL (there is more than one method) and discuss with host your SSL Cert. (If the cert. is not up to date, you need to discuss that with them).

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘A new SSL redirect problem’ is closed to new replies.