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 Quote Link to comment 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! Quote Link to comment 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 Quote Link to comment 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. Quote Link to comment 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 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.