Jump to content


HTTP 403 (Forbidden)

  • Please log in to reply
3 replies to this topic

#1 studipskaterkid

  • New Members
  • Pip
  • Newbie
  • 2 posts

Posted 20 June 2003 - 02:18 AM

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!

#2 effigy

  • Staff Alumni
  • Advanced Member
  • 3,600 posts
  • LocationIL

Posted 20 June 2003 - 04:06 PM

in the Directory directive for that folder, you need to remove Indexes.
Regexp | Unicode Article | Letter Database

#3 phpfreak

  • Members
  • PipPipPip
  • Advanced Member
  • 527 posts
  • LocationEverywhere!

Posted 21 June 2003 - 08:58 AM

Here\'s a little something I like to do. I create a file named \"index.php\" and inside it, I put the following code:

header(\"Location /.\");


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!
Eric 'phpfreak' Rosebrock
http://www.Phpfreaks.com Founder

#4 studipskaterkid

  • New Members
  • Pip
  • Newbie
  • 2 posts

Posted 22 June 2003 - 05:06 AM

Thanks! I\'ll try that.

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users