You are here: Re: Simplest scheme for password protection? « PHP Programming Language « IT news, forums, messages
Re: Simplest scheme for password protection?

Posted by laredotornado@zipmail.com on 10/24/06 00:13

Thanks, Rik. This is the solution I'll pursue. But I have one follow
up question. What does "accesscontrol.php" return upon successful
authentication and upon authentication failure?

- Dave


Rik wrote:
> laredotornado@zipmail.com wrote:
> > I have seen .htaccess files, but how can they be built so that they
> > read from a database of stored username and passwords?
>
> That's not that simple.
> You could make .htpasswd files on the fly, but that's hardly preferable, as
> you'll have to create, maintain and verify the file on every change in
> users.
>
> What I'd do:
> create a .htaccess file:
>
> RewriteCond %{REQUEST_FILENAME} -f
> RewriteCond %{REQUEST_FILENAME} !^accesscontrol.php
> RewriteRule ^(.*?)$ accesscontrol.php?file=$i&%{QUERY_STRING} [NC,L]
>
> And handle authentication in accesscontrol.php, and possibly include the
> requested files, or give a Unauthorised header.
> --
> Grtz,
>
> Rik Wasmus

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация