Topic: Password Protect Site?

I'm trying to use this script as sort of a private image uploading service for myself.. is there anyway I can password protect the upload part (www.site.com) but allow people to see the images that I uploaded to www.site.com/images?

Thumbs up

Re: Password Protect Site?

Yep, http://chevereto.com/forums/topic123-pa … ereto.html

rodolfoberrios.com | PLEASE use Tech Support forums to ask for support!

Re: Password Protect Site?

I'm able to view the images, but I'm no longer asked for my login/pass with any browser that i try.. I get the "401 Authorization Required".. heres my htaccess file in public_html

# -FrontPage-

IndexIgnore .htaccess */.??* *~ *# */HEADER* */README* */_vti*

<Limit GET POST>
order deny,allow
deny from all
allow from all
</Limit>
<Limit PUT DELETE>
order deny,allow
deny from all
</Limit>



AuthName "Restricted Area" 
AuthType Basic 
AuthUserFile /home/nyc/.htpasswd 
AuthGroupFile /dev/null 
<Files *.php>
require valid-user
</Files>
<Files *.js>
require valid-user
</Files>

seems like its the <Files> part thats the reason y its not working because i can login with this:

# -FrontPage-

IndexIgnore .htaccess */.??* *~ *# */HEADER* */README* */_vti*

<Limit GET POST>
order deny,allow
deny from all
allow from all
</Limit>
<Limit PUT DELETE>
order deny,allow
deny from all
</Limit>



AuthName "Restricted Area" 
AuthType Basic 
AuthUserFile /home/nyc/.htpasswd 
AuthGroupFile /dev/null 
require valid-user

I dont know about that stuff above AuthName, but it was in my htaccess so i didnt remove it form the file.. i tried removing it also and i wasnt able to login.. only when i removed the <Files> part did it work but of course the images werent viewable to unauthorized people

Thumbs up

Re: Password Protect Site?

You are doing it wrong.
When you place the "FILES" directive you are telling apache that those files will require pass. That means that .php files are requesting pass... Not .jpg or .css files.

So, the problem may be that your server doesn't support the files directive or (most likely) that your .htaccess is wrong.
Try to use just the lines of the example and see if it works.

rodolfoberrios.com | PLEASE use Tech Support forums to ask for support!