Forum Moderators: phranque

Message Too Old, No Replies

Images directory allowed to members only but...

.htaccess block images in html after logged in

         

tomda

10:06 am on Sep 3, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi,
I am new in htaccess.

I have a .htacces file in the images folder in order to protect non members to browse the images directory.
The password.txt (list of all members & passwords) is updated automatically when a person register.


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

PerlSetVar AuthFile foo/pass/password.txt
AuthName "Acces Restreint"
AuthType Basic

require valid-user

It works great, but the only problem is that the 'Access restreint' window is always appearing when browsing the site even if the member has logged in.

Is there a way to protect images in the directory without interfering with the image content of the website?

Hope my explanation is clear.
Thanks