From: Rich Bowen
In general, .htaccess files use the same syntax as
the main configuration
- files. What you can put in these files is determined by the
+ files. What you can put in these files is determined by the
AllowOverride directive. This
directive specifies, in categories, what directives will be
honored if they are found in a .htaccess file. If a
@@ -100,7 +100,7 @@ changes on a per-directory basis.
In general, you should never use .htaccess files unless
+
In general, you should only use .htaccess files when
you don't have access to the main server configuration file. There is,
for example, a common misconception that user authentication should
always be done in .htaccess files, and, in more recent years,
@@ -259,14 +259,14 @@ changes on a per-directory basis.
As discussed in the documentation on Configuration Sections,
.htaccess files can override the <Directory> sections for
the corresponding directory, but will be overriden by other types
- of configuration sections from the main configuration files. This
+ of configuration sections from the main configuration files. This
fact can be used to enforce certain configurations, even in the
- presence of a liberal AllowOverride setting. For example, to
+ presence of a liberal AllowOverride setting. For example, to
prevent script execution while allowing anything else to be set in
.htaccess you can use:
-<Directory />
+<Directory /www/htdocs>
Allowoverride All
@@ -279,6 +279,8 @@ Options +IncludesNoExec -ExecCGI
</Location>
DocumentRoot is /www/htdocs.In general, .htaccess files use the same syntax as
the main configuration
- files. What you can put in these files is determined by the
+ files. What you can put in these files is determined by the
.htaccess file. If a
@@ -122,7 +122,7 @@ changes on a per-directory basis.
In general, you should never use .htaccess files unless
+
In general, you should only use .htaccess files when
you don't have access to the main server configuration file. There is,
for example, a common misconception that user authentication should
always be done in .htaccess files, and, in more recent years,
@@ -288,15 +288,15 @@ changes on a per-directory basis.
.htaccess files can override the .htaccess you can use:
/www/htdocs.