• Resolved carlabaldwin

    (@carlabaldwin)


    I have existing WordPress website that has been up and running for over a year with a SHOPP shopping cart connected to PayPal. Everything was working properly. Client decided to switch to payment gateway for internal credit card processing. I switched them to a dedicated IP, purchased and installed SSL on domain, purchased and installed gateway plugin.

    I edited htaccess file as follows:

    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteCond %{HTTPS} !=on
    RewriteRule ^(.*) https://%{SERVER_NAME}/$1 [R,L]
    </IfModule>

    and wp-config file:
    define('FORCE_SSL_ADMIN', true);

    I also edited the general settings in WP admin so that WP URL and site URL are set to https://domain.com

    results:
    All the CSS on the site is broken.
    Cannot get into WP Admin. Getting the “too many redirects”

    I log in to PHPmyAdmin and change site URL back to http so that I can access WP admin panel and change settings back to http

    So at this point the pages are trying to load htpps but with mixed content errors. The order form in SHOPP will not load at all. I get a “cannot load web page” error in Chrome.

    I have since reset the wp-config file back to original form as well as the htaccess file just so the site looks normal while I try to figure this out.

    I need an SSL/https expert on this. PLEEESE help!!

    thank you!

Viewing 2 replies - 1 through 2 (of 2 total)
  • It sounds like Apache is behind a reverse proxy, e.g. NginX / CloudFlare / CloudFront etc. and doesn’t actually receive the HTTPS connection itself. As such:

    * Apache will never see HTTPS=on
    * WordPress can’t detect HTTPS with is_ssl()

    You can test for this by removing the redirect from .htaccess, and installing SSL Insecure Content Fixer. It has a test page (under Tools menu) that will tell you if that is the case, and how to detect it.

    You can then use the method it recommends (e.g. HTTP_X_FORWARDED_PROTO) in your .htaccess file, and either edit the site’s wp-config.php file to handle that for WordPress or let the plugin handle it for you.

    cheers,
    Ross

    Thread Starter carlabaldwin

    (@carlabaldwin)

    Thank you Ross. I figured it out with help of hosting provider (Bluehost). I had to add the redirect code to .htaccess file and change URL of WordPress and Site address in settings. I should NOT have changed the wp-config file. That was causing a loop – too many redirects. I was told that with the new SSL you do not change the wp-config file. www.ads-software.com should update the Codex.

    Thank you for your quick response!!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Cannot get SSL/https to work properly on site’ is closed to new replies.