Support » Plugin: Really Simple SSL » Site is Broken after Switch to HTTPS with Really Simple SSL

  • Resolved blake1988

    (@blake1988)


    We have recently installed an SSL certificate onto a clients website.

    After it was installed we used “Really Simple SSL” to activate.

    https://mypathway.com.au/

    We followed all promps. The Site is now loading on HTTPs however, as you can see the site is broken and content is not loading as it was designed.

    Could you please advise why this may be happening and what we can do to fix it?

    Thanks.

    The page I need help with: [log in to see the link]

Viewing 12 replies - 1 through 12 (of 12 total)
  • Plugin Contributor Mark

    (@markwolters)

    Hi @blake1988,

    there are two main issues on your site. One is that some stylesheets are loading via an IP instead of a domain name. For example: https://103.42.110.34/~mypathwaycom/wp-content/themes/jobscout/style.css?ver=5.5.3

    An SSL certificate is usually only valid for the domain name and not for the IP address. Therefore the stylesheets do not load over https://. To fix this, you can replace 103.42.110.34/~mypathwaycom with mypathway.com.au directly in the database. This can be done with a tool like Better Search Replace. We de recommend to create a backup of your database before doing this.

    Secondly, some .svg files are returning a 404 error on your site. For example: https://mypathway.com.au/new/wp-content/uploads/2020/10/17.svg. Could you check if this file is present in your media library? It could be there’s a specific hotlinking rule which prevents the .svg files from showing. It could also be there’s a seperate redirect for .svg files in your .htaccess file which is preventing the .svg files from loading correctly.

    Thread Starter blake1988

    (@blake1988)

    Hi,

    Thanks for your reply!

    I have tried to do this just now with Better Search Replace. I am unsure of how to do this with a specific file.

    I did run a:
    Search: 103.42.110.34/~mypathwaycom
    Replace: mypathway.com.au
    However this returned 0 results.

    How would i go about editing the path in Cpanel?

    Is there a way to check the .svg files in Cpanel too?

    Thanks again for your help.

    Plugin Contributor Mark

    (@markwolters)

    Hi @blake1988,

    have you selected all the tables in the Better Search Replace plugin? If all tables have been selected and no results have been found, it’s possible the 103.42.110.34/~mypathwaycom link has been hardcoded in one of your themes template files. You could try to search your websites directory and manually replace 103.42.110.34/~mypathwaycom with mypathway.com.au.

    In regards to the .svg files, you could check if hotlink protection has been enabled in cPanel. You can also find your .htaccess file via the cPanel file manager. If you can post your .htaccess file here we can check if it contains any rules regarding .svg files.

    Thread Starter blake1988

    (@blake1988)

    Hi. Yes I have selected all tables.
    What exactly should I place in the search and replace fields? Maybe I am getting that wrong.

    If it is hard coded into a theme do I just search in files in cpanel? Or where would I search?

    Would it be hard coded into the child theme?

    Thanks again for all of your help.

    Once I sort this CSS out I will move on to the image files.

    Plugin Contributor Mark

    (@markwolters)

    You can replace 103.42.110.34/~mypathwaycom with mypathway.com.au. To find out if the links are hardcoded in a theme file, you need to search in all your theme files. I don’t think the cPanel file manager searches within files. You might have to download your theme and child theme folders and search inside the files.

    Thread Starter blake1988

    (@blake1988)

    I have found reference to it in the functions.php file in the child theme

    Can i just go ahead and edit this?

    <?php
    function my_theme_enqueue_styles() {

    $parent_style = ‘jobscout’;

    wp_enqueue_style( $parent_style, ‘http://103.42.110.34/~mypathwaycom/wp-content/themes/jobscout/style.css&#8217; );
    wp_enqueue_style( ‘mypathway’,
    http://103.42.110.34/~mypathwaycom/wp-content/themes/mypathway/style.css&#8217;,
    array( $parent_style ),
    wp_get_theme()->get(‘Version’)
    );
    }
    add_action( ‘wp_enqueue_scripts’, ‘my_theme_enqueue_styles’ );

    /**
    * Header Start

    Plugin Contributor Mark

    (@markwolters)

    Yes, you can replace both occurances http://103.42.110.34/~mypathwaycom with https://mypathway.com.au. After that, the stylesheets should load correctly.

    Thread Starter blake1988

    (@blake1988)

    Mark!

    It worked!!

    Thank you very much for your help!

    Thread Starter blake1988

    (@blake1988)

    Hi,

    Back again.

    I am still having issues with the SVG files not coming over. They are still returning with the following error:

    Failed to load resource: the server responded with a status of 404 ()

    Please see below my .htaccess contents. Not sure if you can help further.

    No hotlink protection is enabled in Cpanel

    # BEGIN rlrssslReallySimpleSSL rsssl_version[3.3.5]
    <IfModule mod_rewrite.c>
    RewriteEngine on
    RewriteCond %{HTTPS} !=on [NC]
    RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R=301,L]
    </IfModule>
    # END rlrssslReallySimpleSSL
    # BEGIN WordPress
    # The directives (lines) between “BEGIN WordPress” and “END WordPress” are
    # dynamically generated, and should only be modified via WordPress filters.
    # Any changes to the directives between these markers will be overwritten.

    # END WordPress
    # BEGIN LiteSpeed
    # The directives (lines) between “BEGIN LiteSpeed” and “END LiteSpeed” are
    # dynamically generated, and should only be modified via WordPress filters.
    # Any changes to the directives between these markers will be overwritten.
    <IfModule Litespeed>
    SetEnv noabort 1
    </IfModule>
    # END LiteSpeed

    Plugin Author RogierLankhorst

    (@rogierlankhorst)

    That is because the URL to these images is incorrect.

    For example, you are referring to these images with:
    https://mypathway.com.au/new/wp-content/uploads/2020/10/13.svg

    But the actual URL is
    https://mypathway.com.au/wp-content/uploads/2020/10/13.svg

    So you should replace the url from /new to the current domain.

    this is probably a leftover from a development environment. To prevent such issues, I recommend to use a migration plugin when moving a site. For example Duplicator.

    Thread Starter blake1988

    (@blake1988)

    Thanks for the reply Rogier.

    Where would I go to replace these URLs?
    I can’t seem to find where to do it anywhere.

    Thanks.

    Plugin Contributor Mark

    (@markwolters)

    Hi @blake1988,

    you can replace

    mypathway.com.au/new

    with

    mypathway.com.au

    in the Better Search Replace plugin. .svg files do seem to be working now.

Viewing 12 replies - 1 through 12 (of 12 total)
  • You must be logged in to reply to this topic.