0

So, I am trying to publish my website on hostgator, uploaded all the files, purchased SSL. But when I visit my website, it doesnt redirect to the secure page. So I opened .htaccess and edited the code to

RewriteEngine On 
RewriteCond %{SERVER_PORT} 80 
RewriteRule ^(.*)$ https://www.altjenberberi.com/$1 [R,L]

But page wont load unless I click "Load unsafe scripts"

enter image description here

and if I click it it redirects me to an unsafe version.

Most of the js scripts used are uploaded in the project, and it loads online only google fonts and this <script src="http://a.vimeocdn.com/js/froogaloop2.min.js"></script>

Note: the errors on the photo above are related to particles.js because I have called it but not included in the page.

particles.js:1495 Uncaught TypeError: Cannot read property 'getElementsByClassName' of null
    at window.particlesJS (particles.js:1495)
    at app.js:15
window.particlesJS @ particles.js:1495
(anonymous) @ app.js:15

particles.js:1495 Uncaught TypeError: Cannot read property 'getElementsByClassName' of null
    at window.particlesJS (particles.js:1495)
    at XMLHttpRequest.xhr.onreadystatechange (particles.js:1531)

EDIT: edited the .htaccess with this script so it wont have any mistake in spelling

    RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}

EDIT 2: Not sure why but if I entirely remove this line of code

  <script src="http://a.vimeocdn.com/js/froogaloop2.min.js"></script>

the page refuses to load and only shows the Loading Logo.

Not sure if its a bug related with ssl not working, but I haven't called the script at all in my page, yet its not loading if its not there

BTEK
  • 57
  • 8
  • @AndrewMorton its the same as going just mysite.com. it won't load unless I click "load unsafe scripts" – BTEK Dec 02 '19 at 13:16
  • what do you suggest me to do? – BTEK Dec 02 '19 at 13:30
  • page wont load at all, doesn't matter if I add https or just remove that script at all, the page wont load. not sure if its a bug related to this one or should make an other post about it, but I have not called the script anywhere – BTEK Dec 02 '19 at 13:44
  • Ah, apparently you need to do something else: [Is the Froogaloop2 library / API still supported?](https://stackoverflow.com/questions/46949778/is-the-froogaloop2-library-api-still-supported/47033143#47033143) – Andrew Morton Dec 02 '19 at 13:46
  • but I don't use the vimeo page at all, it was included with the template I am using but I removed all the video section. Why is the site still requesting me to call the link? – BTEK Dec 02 '19 at 13:47
  • it won't load even if I use ``https://player.vimeo.com/api/player.js`` from as suggested to the post you just tagged – BTEK Dec 02 '19 at 13:48
  • If you use your browser's developer tools (press F12), you should be able to find a pane which shows all the network requests. Do any of them show 404, or similar, to indicate it couldn't download some resource? – Andrew Morton Dec 02 '19 at 13:51
  • Also, and still using the developer tools, there will be a console which will show errors in JavaScript. Perhaps the template you are using is trying to use code from Froogaloop2, which is no longer available. In that case, maybe you could extract the relevant function(s) and host them on your site. – Andrew Morton Dec 02 '19 at 13:54
  • https://prnt.sc/q52hm5 this is what shows in the console – BTEK Dec 02 '19 at 13:55
  • The first warning should be fixable if you can track down where it's trying to use http:. For the second warning, look at the URL and see how it has been mangled - you need to correct that; perhaps a find-and-replace went wrong and has corrupted other text too. – Andrew Morton Dec 02 '19 at 14:00
  • while the first was easy to fix, the 2nd seem to be the cause for all these issues, and its kinda impossible for me to fix at this moment as I don't understand to how to fix it in first place. or what is wrong with it. I tried removing the script but page wont load, it just shows the loading animation but not continue after it.. – BTEK Dec 02 '19 at 14:15

1 Answers1

1

The browser won't load <script src="http://..."> in a secure connection. Replace each of these scripts with a link to a secure script (like: <script src="https://....">

Also make sure no images or other resource is getting loaded via http://

cloned
  • 6,346
  • 4
  • 26
  • 38
  • the only script that is not https is from google and `` `` but I don't know why when I delete this page wont load, so haven't checked that bug yet. I don't use vimeo anymore so not sure – BTEK Dec 02 '19 at 13:14