For Programmers: Free Programming Magazines  


Home > Archive > PHP Language > March 2004 > Protecting folders









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Protecting folders
Snah

2004-03-29, 8:32 am

hi,

what's the best way to protect folders (like images) so then can be load by
the website, but nobody can browse on it

thx


thomas L.

2004-03-29, 8:32 am

i think .htaccess is the easiest way, if you're using apache-hosting
that is. there are tons of sites where they have info on that one. i
think it would be rather useless to make a complete login-system for a
few pages / folders....

..htaccess actually works pretty simple...

cheerz
thomas

Snah wrote:

> hi,
>
> what's the best way to protect folders (like images) so then can be load by
> the website, but nobody can browse on it
>
> thx
>
>

Snah

2004-03-29, 11:34 am

Thanks for the information.
htaccess is working now (almost)
where can I add the user ? The website is running at a provider so i don't
have access to everything.


"thomas L." <fishcom@pi.be> wrote in message
news:c495k6$jsa$2@reader13.wxs.nl...[color=darkred]
> i think .htaccess is the easiest way, if you're using apache-hosting
> that is. there are tons of sites where they have info on that one. i
> think it would be rather useless to make a complete login-system for a
> few pages / folders....
>
> .htaccess actually works pretty simple...
>
> cheerz
> thomas
>
> Snah wrote:
>
by[color=darkred]


thomas L.

2004-03-29, 12:31 pm

Snah wrote:
> Thanks for the information.
> htaccess is working now (almost)
> where can I add the user ? The website is running at a provider so i don't
> have access to everything.
>
>
> "thomas L." <fishcom@pi.be> wrote in message
> news:c495k6$jsa$2@reader13.wxs.nl...
>
>
> by
>
>
>
>



here's a tool you can use to make the .htaccess and password files for you:
http://tools.priorweb.be/protected-pages/

it's all in dutch, so here's a small translation:
htaccess:
- title
- website directory (the directory of your site, without the http://)
- username on the system

htpasswd-file:
-user 1:
-password1:

- user2:
......



generate-button


this gives you two textfields, first one you put in a textfile and
upload to the directory you want to 'secure'. after you uploaded the
file, you change the name to '.htaccess' (better to it afterwards, some
ftp-clients have problems with uploading these buggers)

the second textfield (htpassword) you copy/paste in another textfile and
uploade it too (the same directory as the htaccess file)
you name this one '.htpasswd'


after this, you'll be 'prompted' to give a username / password to enter
that specific directory.

the password is here encrypted with md5...so it should be 'safe' for
basic things...



good luck,
thomas
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com