Christopher Juckins

SysAdmin Tips, Tricks and other Software Tools

User Tools

Site Tools


htaccess_files

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revisionBoth sides next revision
htaccess_files [2008/02/03 14:35] – created juckinshtaccess_files [2016/10/15 09:41] juckins
Line 18: Line 18:
 Adding password for user rbowen Adding password for user rbowen
 </code> </code>
 +
 +To allow access to just specific directories, block access the the root level.  .htacess in the document root should look like this:
 +<code>
 +# Refuse direct access to all files
 +Order deny,allow
 +Deny from all
 +Allow from 127.0.0.1
 +</code>
 +Then create an htaccess file in whatever directories you want to allow access to:
 +<code>
 +Allow from all
 +</code>
 + 
htaccess_files.txt · Last modified: 2021/09/30 14:40 by juckins