Block folder access, but not PHP include's access

Need help installing PHP, configuring a script, or configuring a server? Then come on in and post your questions! We'll try to help the best we can!

Moderator: General Moderators

Post Reply
User avatar
tecktalkcm0391
DevNet Resident
Posts: 1030
Joined: Fri May 26, 2006 9:25 am
Location: Florida

Block folder access, but not PHP include's access

Post by tecktalkcm0391 »

How can I edit the .htaccess file to block access to http://site.com/config/... tried putting this in the .htaccess file, but i get a 500 error on all pages on the site:

Code: Select all

<Directory /home/config/>
Order Deny,Allow
Deny from all
</Directory>
What can i do to block (client-side) access to the config folder (and allow PHP in there still)?
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

PHP doesn't attempt access though Apache unless you're using remote requests.
Post Reply