<li><img alt="" src="../images/down.gif" /> <a href="#canonicalurl">Canonical URLs</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#uservhosts">Virtual Hosts Per User</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#moveddocroot">Moved <code>DocumentRoot</code></a></li>
+<li><img alt="" src="../images/down.gif" /> <a href="#fallback-resource">Fallback Resource</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#mass-virtual-hosting">Mass Virtual Hosting</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#dynamic-proxy">Proxying Content with mod_rewrite</a></li>
</ul><h3>See also</h3><ul class="seealso"><li><a href="../mod/mod_rewrite.html">Module documentation</a></li><li><a href="intro.html">mod_rewrite introduction</a></li><li><a href="access.html">Controlling access</a></li><li><a href="advanced.html">Advanced techniques and tricks</a></li><li><a href="avoid.html">When not to use mod_rewrite</a></li></ul></div>
</dd>
</dl>
+</div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
+<div class="section">
+<h2><a name="fallback-resource" id="fallback-resource">Fallback Resource</a></h2>
+
+
+<dl>
+<dt>Description:</dt>
+<dd>You want a single resource (say, a certain file, like index.php) to
+handle all requests that come to a particular directory, except those
+that should go to an existing resource such as an image, or a css file.</dd>
+
+<dt>Solution:</dt>
+<dd>
+<p>As of version 2.4, you should use the <code class="directive"><a href="../mod/mod_dir.html#fallbackresource">FallbackResource</a></code> directive for this:</p>
+
+<div class="example"><pre>
+<Directory /var/www/my_blog>
+ FallbackResource index.php
+</Directory>
+</pre></div>
+
+<p>However, in earlier versions of Apache, or if your needs are more
+complicated than this, you can use a variation of the following rewrite
+set to accomplish the same thing:</p>
+
+<div class="example"><pre>
+<Directory /var/www/my_blog>
+ RewriteBase /my_blog
+
+ RewriteCond /var/www/my_blog/%{REQUEST_FILENAME} !-f
+ RewriteCond /var/www/my_blog/%{REQUEST_FILENAME} !-d
+ RewriteRule ^ index.php [PT]
+</Directory>
+</pre></div>
+
+<p>If, on the other hand, you wish to pass the requested URI as a query
+string argument to index.php, you can replace that RewriteRule with:</p>
+
+<div class="example"><pre>
+ RewriteRule (.*) index.php?$1 [PT,QSA]
+</pre></div>
+
+<p>Note that these rulesets can be uses in a <code>.htaccess</code>
+file, as well as in a <Directory> block.</p>
+
+</dd>
+
+</dl>
+
</div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="section">
<h2><a name="mass-virtual-hosting" id="mass-virtual-hosting">Mass Virtual Hosting</a></h2>
</section>
-
-
<section id="static-to-dynamic">
<title>From Static to Dynamic</title>
</section>
+<section id="fallback-resource">
+<title>Fallback Resource</title>
+
+<dl>
+<dt>Description:</dt>
+<dd>You want a single resource (say, a certain file, like index.php) to
+handle all requests that come to a particular directory, except those
+that should go to an existing resource such as an image, or a css file.</dd>
+
+<dt>Solution:</dt>
+<dd>
+<p>As of version 2.4, you should use the <directive
+module="mod_dir">FallbackResource</directive> directive for this:</p>
+
+<example>
+<pre>
+<Directory /var/www/my_blog>
+ FallbackResource index.php
+</Directory>
+</pre>
+</example>
+
+<p>However, in earlier versions of Apache, or if your needs are more
+complicated than this, you can use a variation of the following rewrite
+set to accomplish the same thing:</p>
+
+<example>
+<pre>
+<Directory /var/www/my_blog>
+ RewriteBase /my_blog
+
+ RewriteCond /var/www/my_blog/%{REQUEST_FILENAME} !-f
+ RewriteCond /var/www/my_blog/%{REQUEST_FILENAME} !-d
+ RewriteRule ^ index.php [PT]
+</Directory>
+</pre>
+</example>
+
+<p>If, on the other hand, you wish to pass the requested URI as a query
+string argument to index.php, you can replace that RewriteRule with:</p>
+
+<example>
+<pre>
+ RewriteRule (.*) index.php?$1 [PT,QSA]
+</pre>
+</example>
+
+<p>Note that these rulesets can be uses in a <code>.htaccess</code>
+file, as well as in a <Directory> block.</p>
+
+</dd>
+
+</dl>
+
+</section>
+
<section id="mass-virtual-hosting">
<title>Mass Virtual Hosting</title>
</section>
-
-
</manualpage>