Forum Moderators: phranque
# Default to allow all to use .htaccess
<Directory /*>
AllowOverride All
</Directory>
#
# Disable .htaccess in this path
<Directory /cannot/use/htaccess/*>
AllowOverride None
</Directory>
#
# But turn some features back on for this one dir in the above path
<Directory /cannot/use/htaccess/[b]but-this-one-can[/b]/*>
AllowOverride FileInfo Options
</Directory>
The processing of matches varies depending on what version of Apache you are using and can be quite complex, so read all the linked documentation very carefully. Also, if you're on Apache 1.x, try to keep the <Directory>-priority-structure very simple to minimize problems when you migrate to Apache 2.x
Note that you can allow users to set per-directory Options, or reserve Options configuration for the httpd.conf level, depending on how you set AllowOverride in httpd.conf. Be aware that the FollowSymLinks or SymLinksIfOwnerMatch Options must be enabled for users to be able to use mod_rewrite in .htaccess. Similarly, AllowOverride FileInfo is needed to allow users to define their own ErrorDocument(s) -- There are many combinations of AllowOverride and Options settings, so I cannot describe them all here.
Be sure you give your users absolutely everything they need to do what they want and need to do (but no more).
Jim