graham23s Posted June 24, 2007 Share Posted June 24, 2007 Hi Guys, i was wondering if there was a way you can stop people looking in your upload folder if someone types: www.mysite.com/uploads the whole directory and its contents are shown any way to stop this? thanks guys Graham Link to comment https://forums.phpfreaks.com/topic/56982-solved-protecting-the-upload-folder/ Share on other sites More sharing options...
bigbob Posted June 24, 2007 Share Posted June 24, 2007 yes. Password protect it with .htaccess. Here, i'll walk you through it. 1. Open a notepad. 2. Type this code in: AuthUserFile /your/directory/here/.htpasswd AuthGroupFile /dev/null AuthName "Secure Document" AuthType Basic <LIMIT GET PUT POST> require user username </LIMIT> where /your/directory/here/ is your directory and /.htpasswd is the password u want to protect it with. 3. Save it as .htaccess and set the file type to All. 4. Upload to ur main directory. 5. Your done! Link to comment https://forums.phpfreaks.com/topic/56982-solved-protecting-the-upload-folder/#findComment-281466 Share on other sites More sharing options...
graham23s Posted June 24, 2007 Author Share Posted June 24, 2007 Thanks a lot for that BigBob cheers Graham Link to comment https://forums.phpfreaks.com/topic/56982-solved-protecting-the-upload-folder/#findComment-281473 Share on other sites More sharing options...
GingerRobot Posted June 24, 2007 Share Posted June 24, 2007 If you're simply trying to stop them getting a directory listing of the folder, then just add an index page into the folder. Link to comment https://forums.phpfreaks.com/topic/56982-solved-protecting-the-upload-folder/#findComment-281494 Share on other sites More sharing options...
graham23s Posted June 24, 2007 Author Share Posted June 24, 2007 Thanks aswell ginger i never even thought of that. Graham Link to comment https://forums.phpfreaks.com/topic/56982-solved-protecting-the-upload-folder/#findComment-281539 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.