3
votes

We are using Sitecore 6.2 and required to use SSL on the Sitecore admin site.

Everything works perfectly except that when saving the content in the Rich Text editor (clicking ACCEPT button), all URLs to the media library items will be added with "https://....(our domain address)". For example,

"~/media/70E900F781E24A66915FA97E283C148E"

to

"https://www.mywebsite.com/~/media/70E900F781E24A66915FA97E283C148E"

The workaround is to go to HTML editor and manually remove the "https://..." part. If we remove the SSL, then the addition won't happen and it'll work fine.

I'm assuming having the Sitecore admin site on SSL is not rare so I wonder if there is a way to deal with this. Thanks!

1
Interesting issue. I have searched through some Sitecore DLL code, but couldn't find the answer. Maybe you can contact support about this?Ruud van Falier

1 Answers

1
votes

You could probably de-compile and tweak the out-of-the-box LinkProvider class and change the ExpandDynamicLinks() method to replace https:// with http://

The class is defined in the web.config in this setting:

<linkManager defaultProvider="sitecore">
  <providers>
    <clear />
    <add name="sitecore" type="Sitecore.Links.LinkProvider, Sitecore.Kernel" addAspxExtension="true" alwaysIncludeServerUrl="false" encodeNames="true" languageEmbedding="never" languageLocation="filePath" shortenUrls="true" useDisplayName="false" />
  </providers>
</linkManager>

You could re-create it as a custom provider and set the defaultProvider to your custom class:

<linkManager defaultProvider="custom">
  <providers>
    <clear />
    <add name="sitecore" type="Sitecore.Links.LinkProvider, Sitecore.Kernel" addAspxExtension="true" alwaysIncludeServerUrl="false" encodeNames="true" languageEmbedding="never" languageLocation="filePath" shortenUrls="true" useDisplayName="false" />
    <add name="custom" type="CustomUtility.LinkProvider, CustomUtility" addAspxExtension="true" alwaysIncludeServerUrl="false" encodeNames="true" languageEmbedding="never" languageLocation="filePath" shortenUrls="true" useDisplayName="false" />
  </providers>
</linkManager>

If you don't have a de-compiler, ILSpy is a free one.