CSS, JS and Images Links missing when using HTTPS

I have a serious problem with the links when using https. My knowledge with using https is poor. Although following are the processes that i’ve done so far.

Scenario:

Read More
  1. I have a site that uses HTTPS. ( Certified )
  2. I need only one CheckOut page to load in https where the checkout page is related to sub-domain. ex. member.mydomain.com
  3. Site is in WordPress
  4. Not using WooCommerce !!

Results:

  1. Using htaccess i managed to redirect that certain page ie. Checkout page in https and it works.
    ex. https://member.mydomain.com/checkout

However, The Problem:

  1. The problem is that all links are dead links in the checkout page due to which it messes up the whole site. The CSS, JS files all are being loaded in https.

What i have tried so far !!

  1. I tried updating the general settings url to https. So, it works but the same issue to all pages. All the links are broken.

  2. Followed the instructions on this post https://wordpress.stackexchange.com/questions/75921/ssl-breaks-wordpress-css

  3. Also, in this https://managewp.com/wordpress-ssl-settings-and-how-to-resolve-mixed-content-warnings

But the above did not seem to do the trick. I still have the broken links. What am i missing here? Please suggest.

Thank you

Related posts

1 comment

  1. Found the solution finally.. Tried modifying the htaccess file again.

    Following is what i added in my htaccess in order to fix the problem. It might be useful to someone in the future.

    <IfModule mod_rewrite.c>
    #-------------------SUB.DOMAIN.COM---------------------
    RewriteCond %{HTTP_HOST} ^subdomain.domain.com
    RewriteCond %{DOCUMENT_ROOT}/members%{REQUEST_URI} -f
    RewriteRule . %{DOCUMENT_ROOT}/members%{REQUEST_URI} [L]
    RewriteCond %{HTTP_HOST} ^ subdomain.domain.com
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule . subdirectory/index.php [L]
    #-----------------SUB.DOMAIN.COM---------------------
    
    </IfModule>
    # 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
    

    This solved the subdomain issue and the 500 error requests as well as the broken links problem.

Comments are closed.