When a user goes to check out he is taken to a secure page https://mysite.worldsecuresystems.com
However, if the user decides to keep shopping or goes to any other page, he is still using the secure domain. I'm guessing that is because all the URLs to non-secure pages are relative.
In the attached image you can see the security warning that IE displays.
So, is there a way to navigate away from a secure site, without hardcoding the URLs to non-secure domains?
There's no code/script that is provided.
You basically ensure the links are either referencing absolute using https or you can reference links relatively but do not reference http as you'll continue to get the warning prompt.
So go into the template/page and locate all the referenced links and update accordingly.
When done you can post the link to your shop if wanting us to confirm.
Kind regards,
-Sidney
So I added this bit of code to the template and it seems to work:
<script type="text/javascript">
$(function(){
//Use jQuerys .each() method to iterate over each link
$('a').not('[href^="http"],[href^="https"],[href^="mailto:"],[href^=" #"]').each(function() {
//Use .attr() to modify the href, when you provide a callback function
//the arguments passed are the attribute index and its value
$(this).attr('href', function(index, value) {
//This fix solves the problem when you aren't at the root level of a site
// e.g. if you are at site.com/page1/ and the link href is "do/something"
// we need to make sure the absolute url becomes newsite.com/page1/do/something
// if we just prepended the new domain we would actually get newsite.comdo/something
// which obviously wouldn't work
if (value.substr(0,1) !== "/") {
value = window.location.pathname + value;
}
//When you return from the callback function for .attr() it will set the attribute
//to this new value.
//We don't use a trailing slash on mynewurl.com because it will already exist if
//the href starts with a / or it will be part of window.location.pathname
return "http://myshop.businesscatalyst.com" + value;
});
});
});
</script>
North America
Europe, Middle East and Africa
Asia Pacific