Skip to content

Instantly share code, notes, and snippets.

@adamculpepper
Created October 20, 2014 21:42
Show Gist options
  • Save adamculpepper/34af347b078b2e611036 to your computer and use it in GitHub Desktop.
Save adamculpepper/34af347b078b2e611036 to your computer and use it in GitHub Desktop.
Redirect if protocol is secure, but not coming from the store (Business Catalyst, requires jQuery)
// Coming from secure protocol and user is NOT inside the store, redirect to a non-secure connection
if (location.protocol == "https:") {
if (url.search("worldsecuresystems.com") < 0) {
location.protocol = "http:";
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment