From dfb116c70121194fb247aefc7b3ba2bb3d4c2b7f Mon Sep 17 00:00:00 2001
From: Rich Bowen
Type flag
+Sets the MIME type with which the resulting response will be
+sent. This has the same effect as the AddType
directive.
For example, you might use the following technique to serve Perl +source code as plain text, if requested in a particular way:
+ +
+# Files with 'IMG' in the name are gif images.
+RewriteRule IMG - [T=image/gif]
+
Please note that this is a trivial example, and could be better done +using <FilesMatch> instead. Always consider the alternate +solutions to a problem before resorting to rewrite, which will +invariably be a less efficient solution than the alternatives.
diff --git a/docs/manual/rewrite/flags.xml b/docs/manual/rewrite/flags.xml index bf97b577b2..bf9d5feeb2 100644 --- a/docs/manual/rewrite/flags.xml +++ b/docs/manual/rewrite/flags.xml @@ -221,7 +221,22 @@ negate those conditions and use a [Skip] flag.Type flag
+Sets the MIME type with which the resulting response will be
+sent. This has the same effect as the
For example, you might use the following technique to serve Perl +source code as plain text, if requested in a particular way:
+ +Please note that this is a trivial example, and could be better done +using <FilesMatch> instead. Always consider the alternate +solutions to a problem before resorting to rewrite, which will +invariably be a less efficient solution than the alternatives.