jmyeom

disable directory browsing

Jan 10th, 2012
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.00 KB | None | 0 0
  1. open your .htaccess file its in your working directory of where kusaba is...
  2.  
  3. at the top, simply put:
  4.  
  5. Options –Indexes
  6.  
  7. this disallows the directory viewing of all subfolders...
  8.  
  9. so, what if you do want to allow directory browsing on one folder, and thats it? (dunno why you would, but ok!)
  10.  
  11. just put a .htaccess file in that folder (make new folder, just call it .htaccess)
  12. and put :
  13. Options Indexes
  14.  
  15.  
  16. simple!
  17.  
  18. (stop reading if you know what your doing, if you dont understand what i just said, then read on)
  19.  
  20.  
  21.  
  22.  
  23.  
  24. so, say i have 3 folders, and in them 3 folders, i have 3 folders....
  25.  
  26. these folders are nammed a,b,c, and inside them are 3 folders called 1,2,3
  27.  
  28. if i place a htaccess file inside folder a, to block directory browsing, then it will apply for all folders inside that folder, (1,2 and 3)
  29.  
  30.  
  31. if i wanted to disallow browsing to 1and 2 but allow it for 3, inside folder 3, just place a htaccess file inside that folder saying "Options Indexes" to allow it for that directory
Advertisement
Add Comment
Please, Sign In to add comment