SitePoint Sponsor

User Tag List

Results 1 to 9 of 9
  1. #1
    SitePoint Zealot
    Join Date
    Jan 2006
    Posts
    106
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    first time using https

    Hi, this is the first time i'm using SSL (for CC processing). Since the URl of this page starts with 'https', all internal links on it have an https prefix which i'd like to avoid. for example, the link to the home page is https://www.mysite.com. How would it be best to approach this?
    thanks

  2. #2
    SitePoint Enthusiast
    Join Date
    Jan 2004
    Location
    Boston, MA
    Posts
    57
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The only link you will need to have with HTTPS will be secure links for payment, customer area etc.

    Also keep in mind SSL certificates are very specific, if you purchase a certificate for yoursite.com you can load https://yoursite.com but will get a warning about missmatched information if you try to send your users to https://www.yoursite.com

  3. #3
    SitePoint Zealot
    Join Date
    Jan 2006
    Posts
    106
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi OKIHost, and thanks for replying.

    what i meant is, the menus on the https page are the same as on all other pages, so the relative URl all point to https://... from this specific page. One way would be use custom menus for this page with full URls, but i was wondering if there is a more elegant way that other more experienced users might use.

  4. #4
    In memoriam gold trophysilver trophybronze trophy Dan Schulz's Avatar
    Join Date
    May 2006
    Location
    Aurora, Illinois
    Posts
    15,495
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Wait a sec, are you saying that ALL of the links from within the https:// pages are pointing to that? If tha'ts the case, then it sounds like you're using relative URLs. Put the full explicit path to the page in the menu instead; that should fix the problem.

  5. #5
    SitePoint Author silver trophybronze trophy

    Join Date
    Nov 2004
    Location
    Ankh-Morpork
    Posts
    12,159
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If you want to avoid that, you'll have to use absolute URIs everywhere on the page. Instead of,
    Code HTML4Strict:
    <a href="/page.html">link text</a>
    you need to have,
    Code HTML4Strict:
    <a href="http://example.com/page.html">link text</a>

    This means users may get a warning about leaving a secure page when they click on a link, though.
    Birnam wood is come to Dunsinane

  6. #6
    SitePoint Zealot
    Join Date
    Jan 2006
    Posts
    106
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    AutisticCuckoo, Dan

    This is what i was planning to do, just thought that maybe adding some conditions in .htaccess could provide a more elegant solution, but seems like its not.

    Thanks

  7. #7
    In memoriam gold trophysilver trophybronze trophy Dan Schulz's Avatar
    Join Date
    May 2006
    Location
    Aurora, Illinois
    Posts
    15,495
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    We're practicioners of Occam's Razor here at SitePoint - the best solution is often the simplest one.

  8. #8
    SitePoint Zealot
    Join Date
    Jan 2006
    Posts
    106
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by AutisticCuckoo View Post
    If you want to avoid that, you'll have to use absolute URIs everywhere on the page. Instead of,
    Code HTML4Strict:
    <a href="/page.html">link text</a>
    you need to have,
    Code HTML4Strict:
    <a href="http://example.com/page.html">link text</a>

    This means users may get a warning about leaving a secure page when they click on a link, though.
    So i've discarded all relative URIs on the secure pages in favour of full http:// links.

    The problem now is that on IE i get a "This page contains both secure and nonsecure items. Do you want to display the nonsecure items?" message each time an https:// page loads.

    From what i read its because of the http:// links

    how do i get past this???

  9. #9
    SitePoint Author silver trophybronze trophy

    Join Date
    Nov 2004
    Location
    Ankh-Morpork
    Posts
    12,159
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    This problem tends to occur when the page contains images, scripts or style sheets linked with http: instead of https:.

    Only use absolute URIs for links, not for images and such.
    Birnam wood is come to Dunsinane


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •