]> granicus.if.org Git - apache/commitdiff
document [handler=...] and adjust [type=...]
authorAndré Malo <nd@apache.org>
Sat, 24 Jan 2004 22:23:02 +0000 (22:23 +0000)
committerAndré Malo <nd@apache.org>
Sat, 24 Jan 2004 22:23:02 +0000 (22:23 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102402 13f79535-47bb-0310-9956-ffa450edef68

docs/manual/mod/mod_rewrite.html.en
docs/manual/mod/mod_rewrite.xml

index a826895844aa6c94fd0ee1e4c660562e8db42d6f..1dc835cc227521c31cdc5f92f12bf1b1317b3c7d 100644 (file)
@@ -1479,10 +1479,24 @@ There is a special feature:
         (force MIME <strong>t</strong>ype)<br />
          Force the MIME-type of the target file to be
         <em>MIME-type</em>. For instance, this can be used to
+        setup the content-type based on some conditions.
+        For example, the following snippet allows <code>.php</code> files to
+        be <em>displayed</em> by <code>mod_php</code> if they are called with
+        the <code>.phps</code> extension:
+        <div class="example"><p><code>
+            RewriteRule ^(.+\.php)s$ $1 [T=application/x-httpd-php-source]
+        </code></p></div>
+        </li>
+
+        <li>
+        '<strong><code>handler|H</code></strong>=<em>Content-handler</em>'
+        (force Content <strong>h</strong>andler)<br />
+         Force the Content-handler of the target file to be
+        <em>Content-handler</em>. For instance, this can be used to
         simulate the <code>mod_alias</code> directive
         <code>ScriptAlias</code> which internally forces all files
-        inside the mapped directory to have a MIME type of
-        ``<code>application/x-httpd-cgi</code>''.</li>
+        inside the mapped directory to have a handler of
+        ``<code>cgi-script</code>''.</li>
 
         <li>
           '<strong><code>nosubreq|NS</code></strong>' (used only if
index 4cc8878ea4e338f583227a870a116171d553c26f..efff47a4da8104c6490c62239b3af9326f8ce5a3 100644 (file)
@@ -1481,10 +1481,24 @@ There is a special feature:
         (force MIME <strong>t</strong>ype)<br />
          Force the MIME-type of the target file to be
         <em>MIME-type</em>. For instance, this can be used to
+        setup the content-type based on some conditions.
+        For example, the following snippet allows <code>.php</code> files to
+        be <em>displayed</em> by <code>mod_php</code> if they are called with
+        the <code>.phps</code> extension:
+        <example>
+            RewriteRule ^(.+\.php)s$ $1 [T=application/x-httpd-php-source]
+        </example>
+        </li>
+
+        <li>
+        '<strong><code>handler|H</code></strong>=<em>Content-handler</em>'
+        (force Content <strong>h</strong>andler)<br />
+         Force the Content-handler of the target file to be
+        <em>Content-handler</em>. For instance, this can be used to
         simulate the <code>mod_alias</code> directive
         <code>ScriptAlias</code> which internally forces all files
-        inside the mapped directory to have a MIME type of
-        ``<code>application/x-httpd-cgi</code>''.</li>
+        inside the mapped directory to have a handler of
+        ``<code>cgi-script</code>''.</li>
 
         <li>
           '<strong><code>nosubreq|NS</code></strong>' (used only if