Welcome to HBH! If you have tried to register and didn't get a verification email, please using the following link to resend the verification email.

.htaccess and PHPSESSID issues


ghost's Avatar
0 0

i have another problem. i need to deny access to a directory called img. so i put into a root of directory a .htaccess file, which contained the address <files> to /img directory, with deny from all. but i still can access that directory, so i don't absolutely know what to do.. will i need to enable .htaccess in apache or what? also i don't know how to use PHPSESSID. i've tryed to google some info about it, but i can't find any useful tutorial. so any help will be appreciated. thanks in advance for any help…


Mr_Cheese's Avatar
0 1

if you want to deny ALL files in a directory.. just stick up a .htaccess with crap in it.

put this in the .htaccess markupasdasdasdadad

then everything in that directory will result in a 403.


ghost's Avatar
0 0

it looks like that .htaccess isnt allowed somewhere. it's just ignored.


ghost's Avatar
0 0

i've readed, and set my httpd.conf now it working. thanks


ghost's Avatar
0 0

last question. when i put the .htaccess file into a directory, with "deny from all", or with cheese's solution filled with crap… i get forbidden, but server cannot access that dir too. it's an /img dir, do i need that server has access to this, because he needs to load images from there, how can i fix this?


Mr_Cheese's Avatar
0 1

erm.. well if your trying to access images.. then obvioulsy you dont want to block all files within the folder :-/

and the server can still locally use files within a htaccessed folder.

what exactly are you trying to do?