In-My-Opinion.org

».htaccess questions«







Two questions.
Is is a good idea to block people from viewing the .htaccess files itself?
and is this the way I would do it (you guys inspired me to start learning this stuff)

<files .htaccess>
order allow,deny
deny from all
</files>

Would I just add this to my current .htacces file?

Secondly, I want to block people from seeing images that are in a folder that users of my PHPBB upload attachments to. Rightnow you can see them if you know the path.
However, if I try to block the images from being viewed, would it not let them be seen on the PHPBB also, or would it just block people from seeing them through path?

indexignore *

would be the only line I put in a .htaccess file in the directory I don't want people to see?...as stated Im just worried it will block the images in PHPBB?

Thanks for your help...you've created a monster! What? When? Where? Why?


posted by Sippenhaft
  Rebellion is the only way to reform!

in-my-opinion.org -> Technology, Computers, Science, Internet -> Computers and Internet -> .htaccess questions

Yup yup yup



Sippenhaft:
Is is a good idea to block people from viewing the .htaccess files itself?

Yes, it's good.
Sippenhaft:
<files .htaccess>
order allow,deny
deny from all
</files>

Would I just add this to my current .htacces file?

Yup
Sippenhaft:
Secondly, I want to block people from seeing images that are in a folder that users of my PHPBB upload attachments to. Rightnow you can see them if you know the path.

IMO → How to protect your phpBB forum against hackers#29745
Tip 12
Sippenhaft:
would be the only line I put in a .htaccess file in the directory I don't want people to see?...

Yup


posted by knn



This is great.

great now my public files/pictures cant be seen, but show in my forums. Thanks.

Next Question... US prisoner
Do you set passwords to get into certain files with .htaccess or do you do it with something else then just put the permissions in the file?

If I want to have a directory PASSWORD protected instead of UNviewable, can you send me on the correct path to do that?

Thanks so much! Thumb Up

posted by Sippenhaft
  

Try my php script



Use my script. I wrote it a few days ago.

It will .htaccess protect any folder where you run it.

htaccess-protectthisfolder.zip
Use this php script to protect ANY folder with a username/password
Download 1.56 KB



posted by knn
  





Reply to topic






RegisterRegister
Log inLog in
The time now is 21 November 2008, 02:28
php B.B.