The forum of the forums
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Help needed for a script to add https to some links

+2
jucarese
cromar
6 posters

Go down

Solved Help needed for a script to add https to some links

Post by cromar December 22nd 2019, 19:26

Forum address: federer.forumotion.com

I am planning to migrate our forum to the secure https protocol. But before I do that, I need to update certain links that would not be compatible with the new protocol. I have one in particular that is in large number across the forum. Is it possible to have a script that would replace all instances of:
["//drive.google.com] with [="https://drive.google.com] (excluding the bracket).

My knowledge in coding is limited and would very much appreciate if someone could write me a script, if it can be done. Thank you v.m. Smile


Last edited by cromar on January 20th 2020, 23:51; edited 1 time in total
cromar
cromar
New Member

Posts : 18
Reputation : 1
Language : english

http://federer.forumotion.com

Back to top Go down

Solved Re: Help needed for a script to add https to some links

Post by jucarese December 22nd 2019, 20:56

all urls of any google application are already in https a long time ago from google drive too
jucarese
jucarese
Hyperactive

Male Posts : 2487
Reputation : 117
Language : spanish
Location : SSF Admin

http://asistencia.foroactivo.com/u23082

Back to top Go down

Solved Re: Help needed for a script to add https to some links

Post by cromar December 22nd 2019, 23:58

Yes, I know that, but unfortunately I coded the link to my image as shown in my original post, without any protocol, having read that it would adapt to any protocol. But when I run a test by switching our forum to https, all those links no longer worked.

I already posted about this problem earlier and got all kind of info, none of them solving my issue. I basically have to add the missing protocol, changing: ["//drive.google.com] to [="https://drive.google.com]. That's why I am asking for a script, unless you have another solution?
cromar
cromar
New Member

Posts : 18
Reputation : 1
Language : english

http://federer.forumotion.com

Back to top Go down

Solved Re: Help needed for a script to add https to some links

Post by SLGray December 23rd 2019, 00:37

Are these images on your forum or just posted links?


Help needed for a script to add https to some links Slgray10

When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.
SLGray
SLGray
Administrator
Administrator

Male Posts : 51408
Reputation : 3519
Language : English
Location : United States

https://forumsclub.com/gc/128-link-directory/

Back to top Go down

Solved Re: Help needed for a script to add https to some links

Post by Guest December 23rd 2019, 16:03

Post a link to a page with such a link.
avatar
Guest
Guest


Back to top Go down

Solved Re: Help needed for a script to add https to some links

Post by cromar January 6th 2020, 01:33

I just switched my forum to https (second try!), using the default option 2 to force https compatibility (which I didn't do the first time). I did a lot of manual editing before switching, but I know that I haven't got them all yet, so I am using HTTPS Checker to finish the clean up.

What is strange is that the images, with the problem links I have been referring to, are now being displayed correctly (and the external links work fine too), but HTTPS Checker still reports an issue with mixed content for those images:

Here is an example - This is my code on the page (with no protocol):
Code:

[url=//drive.google.com/uc?export=view&id=16fk65PrGPc2JlBaB0KztxvObkEj_Vybw] <img style="width:100%; max-width: 501px;" src="//drive.google.com/uc?export=view&id=16fk65PrGPc2JlBaB0KztxvObkEj_Vybw" title="Click image to view full size" > [/url]

But when I look at the source code for the page, these show up as HTTP links:
Code:
 <a href="http://drive.google.com/uc?export=view&id=16fk65PrGPc2JlBaB0KztxvObkEj_Vybw" target="_blank" rel="nofollow">
<img style="width:100%; max-width: 501px;" src="http://drive.google.com/uc?export=view&id=16fk65PrGPc2JlBaB0KztxvObkEj_Vybw" title="Click image to view full size" >


However, I tested the page with Chrome and Firefox and both browsers still shows the site as being secured. So, it's not a major problem, but I am curious as to why this is happening and it makes difficult to check the site for real issues.

Here is the link to the page on my forum with those images: https://federer.forumotion.com/t635-ubr-latest-news
The 'piano' pictures in the middle of the page are the problem ones. The page can be viewed as a guest. If you need more, let me know.
cromar
cromar
New Member

Posts : 18
Reputation : 1
Language : english

http://federer.forumotion.com

Back to top Go down

Solved Re: Help needed for a script to add https to some links

Post by SLGray January 6th 2020, 01:45

So what exactly is the issue with the piano picture?  I can see 2 images and a Tweet in that post.


Help needed for a script to add https to some links Slgray10

When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.
SLGray
SLGray
Administrator
Administrator

Male Posts : 51408
Reputation : 3519
Language : English
Location : United States

https://forumsclub.com/gc/128-link-directory/

Back to top Go down

Solved Re: Help needed for a script to add https to some links

Post by Ape January 6th 2020, 02:50

There is NO script to change the HTTP to HTTPS you have to work out away to do this your self.
We do not have any tools to help on this matter.

Sorry. Sad


Help needed for a script to add https to some links Left1212Help needed for a script to add https to some links Center11Help needed for a script to add https to some links Right112
Help needed for a script to add https to some links Ape_b110
Help needed for a script to add https to some links Ape1010
Ape
Ape
Administrator
Administrator

Male Posts : 19206
Reputation : 2001
Language : fluent in dork / mumbojumbo & English haha

http://chatworld.forumotion.co.uk/

Back to top Go down

Solved Re: Help needed for a script to add https to some links

Post by Guest January 6th 2020, 11:32

If you go to the http image url yourself, you will notice that it automatically gets redirected to the https version. This is why browsers still view your website as secure.

Redirecting to https will mean an extra request, which adds a couple of milliseconds to your page's load time. If you only have a few images, that shouldn't be an issue. The best course of action would be adding the https protocol yourself to the bbcode/html.
avatar
Guest
Guest


Back to top Go down

Solved Re: Help needed for a script to add https to some links

Post by jucarese January 6th 2020, 22:41

you have a security certificate you don't need any code to convert from http to https, that's what the certificate is doing, only urls that are not possible to convert to https will not be loaded, as long as you have an active certificate, in the case of google drive yourself you can add the "s" manually but you don't need to do it.
jucarese
jucarese
Hyperactive

Male Posts : 2487
Reputation : 117
Language : spanish
Location : SSF Admin

http://asistencia.foroactivo.com/u23082

Back to top Go down

Solved Re: Help needed for a script to add https to some links

Post by skouliki January 12th 2020, 17:06

is this solved?
skouliki
skouliki
Manager
Manager

Female Posts : 15245
Reputation : 1703
Language : English,Greek
Location : Greece

http://iconskouliki.forumgreek.com

Back to top Go down

Solved Re: Help needed for a script to add https to some links

Post by Fleurpink January 16th 2020, 23:24

I don't think so because i have the same probleme and the answer in the top didn't help me.
audacity temp mail origin


Last edited by Fleurpink on January 21st 2020, 22:52; edited 2 times in total
Fleurpink
Fleurpink
New Member

Posts : 2
Reputation : 1
Language : Français

https://help.forumotion.com

Back to top Go down

Solved Re: Help needed for a script to add https to some links

Post by skouliki January 17th 2020, 08:27

Fleurpink wrote:I don't think so because i have the same probleme and the answer in the top didn't help me.

Are you the same person with the topic starter? If not please do not hijack other member’s post if you have a problem open you own thread
skouliki
skouliki
Manager
Manager

Female Posts : 15245
Reputation : 1703
Language : English,Greek
Location : Greece

http://iconskouliki.forumgreek.com

Back to top Go down

Solved Re: Help needed for a script to add https to some links

Post by cromar January 20th 2020, 23:45

Thank you all who participated in this discussion. Some good information and pointers. Now I have a better understanding of the whole process and in short, things are working fine on my migrated forum, meaning links are being redirected to https and pictures are being displayed, but if I want a 'clean' forum, I will have to modify those links myself by adding the missing https protocol manually. Live and learn!

Case closed.
cromar
cromar
New Member

Posts : 18
Reputation : 1
Language : english

http://federer.forumotion.com

Back to top Go down

Solved Re: Help needed for a script to add https to some links

Post by SLGray January 21st 2020, 00:43

Problem solved & topic archived.
Please read our forum rules:  ESF General Rules


Help needed for a script to add https to some links Slgray10

When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.
SLGray
SLGray
Administrator
Administrator

Male Posts : 51408
Reputation : 3519
Language : English
Location : United States

https://forumsclub.com/gc/128-link-directory/

Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum