You are here: Re: Protecting a whole directory - PHP Authentication « PHP Programming Language « IT news, forums, messages
Re: Protecting a whole directory - PHP Authentication

Posted by gosha bine on 08/25/07 08:14

ELINTPimp wrote:
> On Aug 23, 2:15 pm, gosha bine <stereof...@gmail.com> wrote:
>> rogerjam...@googlemail.com wrote:
>>> How would I go about protecting a whole directory, e.g.
>>> http://www.example.com/members/and all sub-directories with login
>>> protection? I wouldn't like to put a .php script in each directory and
>>> I'd like to protect all file-types
>> You can use mod_rewrite to redirect every request to index.php, e.g.
>>
>> RewriteRule .* index.php?file=$0 [L,QSA]
>>
>> --
>> gosha bine
>>
>> extended php parser ~http://code.google.com/p/pihipi
>> blok ~http://www.tagarga.com/blok
>
> Now you're kinda getting into the realm of a front controller and,
> while it will give him the security...I'm not sure exactly what will
> happen with things like /.(jpg|gif|png|css)$ this could work, but
> would reak havok on a lot of other parts of your code, and will likely
> increase complexity unnecessarily. Unless you're already going with
> an MCV design...I'm not sure this would be the best way to tackle it.
>

Sorry, I don't understand what you tried to say here... Maybe it's just
Friday. ;)


--
gosha bine

extended php parser ~ http://code.google.com/p/pihipi
blok ~ http://www.tagarga.com/blok

 

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

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