Stop Https calls after visitng the paymetn page on website

Posted on 2011-05-10
Last Modified: 2012-05-11
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:// ( 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.

Question by:netcomp
    LVL 15

    Accepted Solution

    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 = ""+ currentPageName;
    LVL 16

    Assisted Solution

    Why don't you just specify the other links in the drop down use HTTP rather than HTTPS?

    LVL 16

    Expert Comment

    Ahh - is it that the other links are relative path?

    Is this hosted on Apache?
    LVL 1

    Author Comment

    I ended up using absolute paths.
    Thank you,

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Read about how to choose the best possible content marketing agency to suit your needs. Content marketing has become an integral part of running a successful tech business, so it is wise to be informed.
    Are you using email marketing software? If not, you're missing out on effortless marketing and the reaching of desired conversion rates through email marketing software.
    This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
    The viewer will get a basic understanding of what section 508 compliance can entail, learn about skip navigation links, alt text, transcripts, and font size controls.

    760 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    12 Experts available now in Live!

    Get 1:1 Help Now