Securing the Web Folder

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • arizal
    New Member
    • Feb 2007
    • 25

    #1

    Securing the Web Folder

    Hi,
    I have a folder in a server where all my php files reside. I mean the whole content of the web site is in that folder. So the problem is that if someone knows the filename of any php file, they can directly open the file without login in . I know that there are couple of ways to avoid this. Like adding a line of code to check session at the start of each page. Or to make an .htaccess file.
    I am aware of the first method which is using sessions. But i dont have much idea on making a .htaccess file inside the folder which will prevent the user to access each file seperately.
    Anyone has any idea . or comment which one is better or is there any other way to do this.
    Thanks
Working...