NYCPHP Meetup

NYPHP.org

[nycphp-talk] Remove folder from document root....

Dan Cech dcech at phpwerx.net
Wed May 28 14:02:20 EDT 2008


John Campbell wrote:
> I have a site that has a bunch of stuff that shouldn't be within the
> document root (cron scripts, class files, etc.).  I could move the
> files, but fixing all of the include statements is more trouble than
> it's worth.
> 
> What is the best way to tell Apache ignore a folder that resides in
> the document root?
> I could just rewrite/redirect requests into oblivion, but that seems
> like a kludge.  I feel like there should be a one line apache command
> to do this, but I can't find it in the docs.

Try this in a .htaccess:

Order Allow,Deny
Deny from all

Dan



More information about the talk mailing list