|
Posted by ELINTPimp on 08/24/07 01:49
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.
[Back to original message]
|