SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Member
    Join Date
    Jun 2005
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Secure a website including non-html/php documents

    When I want secure a part of my website by using .htaccess file and make it only accessible with a login/password, all the files and subfolder are also secure. But when I use a php script instead of using .htaccess (because that allows me to make a login form design that integrates with the websites design) to do a secure login to my website it only protects my pages with that script so normally all pictures and other non script-pages would be freely accessibly? Is there a way to have the same kind of security by using a script as when I would be using .htaccess? so all my other files are also protected?

  2. #2
    SitePoint Evangelist DMacedo's Avatar
    Join Date
    May 2004
    Location
    Braga, Portugal
    Posts
    596
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You will have to implement that same PHP security in place of the files and use something like readfile to retrieve them from some other directory (preferably not user-accessible) ...
    ~ Daniel Macedo


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
  •