SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    Pragmatic Programmer halfasleeps's Avatar
    Join Date
    Feb 2006
    Location
    Altoona, PA. USA
    Posts
    1,945
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    sharing files on secure and non-secure pages

    *if this fits better somewhere else feel free to move*

    If i have a page like navigation.php that I include on all my pages. how should I handle including it on secure and non-secure pages?

    first of all should I store it on the https folder or the http folder?

    I am thinking if I store it on the http folder then my secure pages will say "this page has secure and on-secure elements please click here to view the non-secure elements"

    and I am afriad that If i store it on the https folder my non-secure pages will say it.....but I dont want to host a copy of it on each folder because then everytime I update it I have to update both..

    Can someone please advise the best solution?

    THANKS!
    Altoona Design
    Freelance Flex developer for hire.
    ActionScript Programmer with 8 Years Experience.

  2. #2
    Pragmatic Programmer halfasleeps's Avatar
    Join Date
    Feb 2006
    Location
    Altoona, PA. USA
    Posts
    1,945
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    so is it best to just go the redundant route and have a copy in each directory?
    Altoona Design
    Freelance Flex developer for hire.
    ActionScript Programmer with 8 Years Experience.

  3. #3
    SitePoint Zealot
    Join Date
    Jan 2007
    Posts
    191
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Does the https path have to be a different path than the http path? Can't you just have one directory for your site, and when you need it to be secure, then just make is secure with your web server? I don't mess with https much, so I may be wrong, but this is how I thought it worked.

  4. #4
    SitePoint Addict Trent Reimer's Avatar
    Join Date
    Sep 2005
    Location
    Canada
    Posts
    228
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by halfasleeps View Post
    I am thinking if I store it on the http folder then my secure pages will say "this page has secure and on-secure elements please click here to view the non-secure elements"
    Generally those kinds of errors are generated by the browser when it is given an encrypted page with references to other URL's that are not encrypted. e.g. images, scripts, stylesheets...

    When you include content with PHP it is all sent to the browser as a single page. So whether part of the content is one directory or another is normally irrelevant.


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
  •