[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 320
  • Last Modified:

Stop Https calls after visitng the paymetn page on website

Hello,
We are hosting are website on godaddy. We started accepting donations online. So , we got https enabled on our hosting account. We have set static links to our donation form. for example we have the drop down menu and the Donate now linked to httpS://ourdomainanme.com/donate.html ( before this it was just linked to /donate.html .

All works fine wit the https on the donation page, but one the visitor navigates away from the donation page to any other pages using the dorp-down menu, all the links are called using httpS. AS if right after going to the donation page, the site goes on a https loop .
The problem with that Internet Explorer keeps giving  the visitor the Mixed Content warning  because we have images and other items that are linked to external sites that are simple http ( not S) links.  

Is there any way to put the visitors back to http after visiting the donate page in https?
P.S, this is a Dreamwever site with about 40 pages.




0
netcomp
Asked:
netcomp
  • 2
2 Solutions
 
pateljituCommented:
You can add this java script to common page header, this script will check if the current page URL consists https and based on page i.e. if not donate.html redirect users to http;// page.

<script type="text/javascript" language="javascript">

    if(window.location.protocol == "https:"){
        var currentPagePath = window.location.pathname;
        var currentPageName = currentPagePath.substring(currentPagePath.lastIndexOf('/') + 1);

        if(currentPageName != "donate.html") window.location.href = "http://ourdomainname.com/"+ currentPageName;
    }        
</script>
0
 
jessc7Commented:
Why don't you just specify the other links in the drop down use HTTP rather than HTTPS?

httpS://ourdomainanme.com/donate.html
http://ourdomainanme.com/pageA.html
http://ourdomainanme.com/pageB.html
etc...
0
 
jessc7Commented:
Ahh - is it that the other links are relative path?

Is this hosted on Apache?
0
 
netcompAuthor Commented:
I ended up using absolute paths.
Thank you,
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now