SSL Folder - access insecure content

monkey64

Well-Known Member
Nov 6, 2011
111
5
68
cPanel Access Level
Root Administrator
I have an SSL folder as well as a non SSL part to my site.

If I'm in my SSL folder, referencing any insecure images outside the SSL 'wrapper' gives me the "Parts of the page you are viewing were not encrypted before being transmitted over the Internet" in FF. Expected.

The way I would usually deal with this issue, is to make a copy of my images folder within the SSL folder. But that could turn out to be an admin nightmare becuase I have two sets of images to update.

Is it possible to reference content by using a different method? Perhaps using PHP's document root? What is the recommended method?

I have found this article:
Creating symlinks to redirect your site

But I don't want to blindly screw up my WHM installation or plunge my website into a technological abyss!
Any ideas?
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,909
2,224
463
Hello :)

My suggestion would be to edit the script configuration to call the images from the direct path, as opposed to the URL. For example, when linking the images in your script, use:

Code:
/home/username/public_html/path/to/image.jpg
Instead of:

Code:
http://example.com/path/to/image.jpg
This will allow it to be accessed via a secure and non-secure URL.

Thank you.
 

monkey64

Well-Known Member
Nov 6, 2011
111
5
68
cPanel Access Level
Root Administrator
Michael.

Thanks for that, but I since discovered that I can create a shortcut (think they are called Aliases).
WinSCP has the option of creating a new "link", which I found allows you to access material via a secure and non-secure URL.

The main advantage with this method is that the ULS stay the same. I will keep your code above in mind though.

Thanks