You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by rb...@apache.org on 2007/07/25 18:22:29 UTC

svn commit: r559511 - in /httpd/httpd/trunk/docs/manual/rewrite: flags.html.en flags.xml

Author: rbowen
Date: Wed Jul 25 09:22:24 2007
New Revision: 559511

URL: http://svn.apache.org/viewvc?view=rev&rev=559511
Log:
An example of using the [T] flag.

Modified:
    httpd/httpd/trunk/docs/manual/rewrite/flags.html.en
    httpd/httpd/trunk/docs/manual/rewrite/flags.xml

Modified: httpd/httpd/trunk/docs/manual/rewrite/flags.html.en
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/docs/manual/rewrite/flags.html.en?view=diff&rev=559511&r1=559510&r2=559511
==============================================================================
--- httpd/httpd/trunk/docs/manual/rewrite/flags.html.en (original)
+++ httpd/httpd/trunk/docs/manual/rewrite/flags.html.en Wed Jul 25 09:22:24 2007
@@ -210,7 +210,21 @@
 
 
 <h3><a name="flag_t" id="flag_t">T|type</a></h3>
-<p>Type flag</p>
+<p>Sets the MIME type with which the resulting response will be
+sent. This has the same effect as the <code class="directive"><a href="../mod/mod_mime.html#addtype">AddType</a></code> directive.</p>
+
+<p>For example, you might use the following technique to serve Perl
+source code as plain text, if requested in a particular way:</p>
+
+<div class="example"><p><code>
+# Files with 'IMG' in the name are gif images.
+RewriteRule IMG - [T=image/gif]
+</code></p></div>
+
+<p>Please note that this is a trivial example, and could be better done
+using &lt;FilesMatch&gt; instead. Always consider the alternate
+solutions to a problem before resorting to rewrite, which will
+invariably be a less efficient solution than the alternatives.</p>
 
 
 </div></div>

Modified: httpd/httpd/trunk/docs/manual/rewrite/flags.xml
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/docs/manual/rewrite/flags.xml?view=diff&rev=559511&r1=559510&r2=559511
==============================================================================
--- httpd/httpd/trunk/docs/manual/rewrite/flags.xml (original)
+++ httpd/httpd/trunk/docs/manual/rewrite/flags.xml Wed Jul 25 09:22:24 2007
@@ -221,7 +221,22 @@
 </section>
 
 <section id="flag_t"><title>T|type</title>
-<p>Type flag</p>
+<p>Sets the MIME type with which the resulting response will be
+sent. This has the same effect as the <directive
+module="mod_mime">AddType</directive> directive.</p>
+
+<p>For example, you might use the following technique to serve Perl
+source code as plain text, if requested in a particular way:</p>
+
+<example>
+# Files with 'IMG' in the name are gif images.
+RewriteRule IMG - [T=image/gif]
+</example>
+
+<p>Please note that this is a trivial example, and could be better done
+using &lt;FilesMatch&gt; instead. Always consider the alternate
+solutions to a problem before resorting to rewrite, which will
+invariably be a less efficient solution than the alternatives.</p>
 </section>
 
 </section>