ignace Posted June 5, 2009 Share Posted June 5, 2009 Hi How can i exclude a directory from being viewed? When i go to my localhost i get an additional $RECYLE.BIN folder Link to comment https://forums.phpfreaks.com/topic/161025-solved-exclude-a-directory-from-being-able-to-view/ Share on other sites More sharing options...
roopurt18 Posted June 5, 2009 Share Posted June 5, 2009 Drop an .htaccess file in the same folder as $RECYCLE.BIN #.htaccess file # place this in the same directory as the $RECYCLE.BIN folder <Directory ./$RECYCLE.BIN> Order allow,deny Deny from all </Directory> Going from memory there so I could be wrong. Link to comment https://forums.phpfreaks.com/topic/161025-solved-exclude-a-directory-from-being-able-to-view/#findComment-849787 Share on other sites More sharing options...
ignace Posted June 5, 2009 Author Share Posted June 5, 2009 didn't work, i also used this which didn't work either <DirectoryMatch "^\$"> Order allow,deny Deny from all Satisfy All </DirectoryMatch> Link to comment https://forums.phpfreaks.com/topic/161025-solved-exclude-a-directory-from-being-able-to-view/#findComment-849794 Share on other sites More sharing options...
roopurt18 Posted June 5, 2009 Share Posted June 5, 2009 Could do it with mod_rewrite I suppose: RewriteEngine on RewriteRule /\\$RECYCLE.BIN.* - [F,L] You might have to play around with the regexp a little because of that dollar sign. Link to comment https://forums.phpfreaks.com/topic/161025-solved-exclude-a-directory-from-being-able-to-view/#findComment-849796 Share on other sites More sharing options...
ignace Posted June 5, 2009 Author Share Posted June 5, 2009 w00t got it! <LocationMatch "(\$RECYCLE.BIN|System Volume Information)"> Order allow,deny Deny from all </LocationMatch> Link to comment https://forums.phpfreaks.com/topic/161025-solved-exclude-a-directory-from-being-able-to-view/#findComment-849799 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.