I’ve taken over the development of a site and Chrome is blocking URLs which use relative paths with the message that they are served under http when the page is https.
The head of the page is as follows:
<link rel="stylesheet" type="text/css" href="/web-app/css/main.css">
<link rel="stylesheet" type="text/css" href="/web-app/css/cart.css">
<link rel="stylesheet" type="text/css" href="/web-app/css/inventory.css">
<link rel="stylesheet" type="text/css" href="/web-app/css/jquery-ui-1.8.17.custom.css">
<link rel="stylesheet" type="text/css" href="/web-app/css/jquery.fancybox.css?v=2.0.4" media="screen">
<link rel="stylesheet" type="text/css" href="/web-app/css/jquery.fancybox-buttons.css?v=2.0.4" media="screen">
<link rel="stylesheet" type="text/css" href="/web-app/css/jquery.fancybox-thumbs.css?v=2.0.4" media="screen">
<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/jquery-ui.min.js"></script>
<script type="text/javascript" src="/web-app/js/jquery.mousewheel-3.0.6.pack.js"></script>
<script type="text/javascript" src="/web-app/js/jquery.fancybox.pack.js?v=2.0.4"></script>
<script type="text/javascript" src="/web-app/js/jquery.fancybox-buttons.js?v=2.0.4"></script>
<script type="text/javascript" src="/web-app/js/jquery.fancybox-thumbs.js?v=2.0.4"></script>
<script type="text/javascript" src="/web-app/js/jquery.animate_from_to-1.0.min.js"></script>
<script type="text/javascript" src="/web-app/js/main.js"></script>
<script type="text/javascript" src="/web-app/js/cart.js"></script>
<script type="text/javascript" src="/web-app/js/inventory.js"></script>
Shouldn’t a relative url pick up https? Is this a caching issue? My background is ‘nix/open source so I have don’t have much experience with IIS, is there a server setting that can force https for all resources?
thanks!
Answer turned out to be adding a path in Web.config: