<p>In general, <code>.htaccess</code> files use the same syntax as
the <a href="../configuring.html#syntax">main configuration
- files</a>. What you can put in these files is determined by the
+ files</a>. What you can put in these files is determined by the
<code class="directive"><a href="../mod/core.html#allowoverride">AllowOverride</a></code> directive. This
directive specifies, in categories, what directives will be
honored if they are found in a <code>.htaccess</code> file. If a
<div class="section">
<h2><a name="when" id="when">When (not) to use .htaccess files</a></h2>
- <p>In general, you should never use <code>.htaccess</code> files unless
+ <p>In general, you should only use <code>.htaccess</code> 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 <code>.htaccess</code> files, and, in more recent years,
<p>As discussed in the documentation on <a href="../sections.html">Configuration Sections</a>,
<code>.htaccess</code> files can override the <code class="directive"><a href="../mod/core.html#directory"><Directory></a></code> 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 <code class="directive"><a href="../mod/core.html#allowoverride">AllowOverride</a></code> setting. For example, to
+ presence of a liberal <code class="directive"><a href="../mod/core.html#allowoverride">AllowOverride</a></code> setting. For example, to
prevent script execution while allowing anything else to be set in
<code>.htaccess</code> you can use:</p>
<div class="example"><p><code>
-<Directory /><br />
+<Directory /www/htdocs><br />
<span class="indent">
Allowoverride All<br />
</span>
</Location>
</code></p></div>
+ <div class="note">This example assumes that your <code class="directive"><a href="../mod/core.html#documentroot">DocumentRoot</a></code> is <code>/www/htdocs</code>.</div>
+
</div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="section">
<p>In general, <code>.htaccess</code> files use the same syntax as
the <a href="../configuring.html#syntax">main configuration
- files</a>. What you can put in these files is determined by the
+ files</a>. What you can put in these files is determined by the
<directive module="core">AllowOverride</directive> directive. This
directive specifies, in categories, what directives will be
honored if they are found in a <code>.htaccess</code> file. If a
<section id="when"><title>When (not) to use .htaccess files</title>
- <p>In general, you should never use <code>.htaccess</code> files unless
+ <p>In general, you should only use <code>.htaccess</code> 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 <code>.htaccess</code> files, and, in more recent years,
<code>.htaccess</code> files can override the <directive
type="section" module="core">Directory</directive> 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 <directive
- module="core">AllowOverride</directive> setting. For example, to
+ module="core">AllowOverride</directive> setting. For example, to
prevent script execution while allowing anything else to be set in
<code>.htaccess</code> you can use:</p>
<example>
-<Directory /><br />
+<Directory /www/htdocs><br />
<indent>
Allowoverride All<br />
</indent>
</indent>
</Location>
</example>
+
+ <note>This example assumes that your <directive
+ module="core">DocumentRoot</directive> is <code>/www/htdocs</code>.</note>
</section>
</section>
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE manualpage SYSTEM "../style/manualpage.dtd">
<?xml-stylesheet type="text/xsl" href="../style/manual.ja.xsl"?>
-<!-- English Revision: 574882:933606 (outdated) -->
+<!-- English Revision: 574882:1002112 (outdated) -->
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
<?xml version='1.0' encoding='EUC-KR' ?>
<!DOCTYPE manualpage SYSTEM "../style/manualpage.dtd">
<?xml-stylesheet type="text/xsl" href="../style/manual.ko.xsl"?>
-<!-- English Revision: 151408:933606 (outdated) -->
+<!-- English Revision: 151408:1002112 (outdated) -->
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE manualpage SYSTEM "../style/manualpage.dtd">
<?xml-stylesheet type="text/xsl" href="../style/manual.pt-br.xsl"?>
-<!-- English Revision: 151408:933606 (outdated) -->
+<!-- English Revision: 151408:1002112 (outdated) -->
<!--
Licensed to the Apache Software Foundation (ASF) under one or more