0

i use Prestashop and force https for all url.

I need to add script with this url: src="//c.imedia.cz/js/retargeting.js" i need url keep like this in html.

but htaccess seems change it to src="https://c.imedia.cz/js/retargeting.js" which doesn't work then.

i tried to add Rewrite rule to prevent override this url

RewriteRule retargeting\.js$ - [L,NC]

Any solution please?

1 Answers1

0

htaccess does not change the src in your HTML. The browser will replace // with the protocol that is used in the request. i.e. https. It's commonly referred to as protocol relative URL.

More info in this answer about that

So if you don't want it to use https then you should explicitly set it as http. That will however cause mixed content when served over https and modern browsers will probably block it. So if you force https then ALL your resources have to be https as well or it will be blocked and not loaded even using http.

So then you should get a wildcard SSL certificate for your subdomains so that your resources can be served as https as well.

Community
  • 1
  • 1
Panama Jack
  • 24,158
  • 10
  • 63
  • 95