studipskaterkid Posted June 20, 2003 Share Posted June 20, 2003 I\'m wondering how I can restrict people from viewing certain folders. I\'m running apche 2 on win xp. I don\'t want people looking at my images file. Right now they are able to view the images by going www.something.com/images and are getting a list of my images and can view them. I want to restrict people from viewing this folder. I also don\'t want to go through all my folders and put an index page either. I do this with Apche, right? Thanks! Quote Link to comment https://forums.phpfreaks.com/topic/616-http-403-forbidden/ Share on other sites More sharing options...
effigy Posted June 20, 2003 Share Posted June 20, 2003 in the Directory directive for that folder, you need to remove Indexes. Quote Link to comment https://forums.phpfreaks.com/topic/616-http-403-forbidden/#findComment-2059 Share on other sites More sharing options...
phpfreak Posted June 21, 2003 Share Posted June 21, 2003 Here\'s a little something I like to do. I create a file named \"index.php\" and inside it, I put the following code: [php:1:6b964ba1b8]<?php header(\"Location /.\"); ?>[/php:1:6b964ba1b8] Then, I place this file in every directory of my website that I don\'t want people listing the contents for. It will automatically redirect them to the index of the site. Good luck! Quote Link to comment https://forums.phpfreaks.com/topic/616-http-403-forbidden/#findComment-2082 Share on other sites More sharing options...
studipskaterkid Posted June 22, 2003 Author Share Posted June 22, 2003 Thanks! I\'ll try that. Quote Link to comment https://forums.phpfreaks.com/topic/616-http-403-forbidden/#findComment-2087 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.