<-
Apache > HTTP サーバ > ドキュメンテーション > バージョン 2.0 > モジュール

Please note

This document refers to the 2.0 version of Apache httpd, which is no longer recommended.
If you are using the current versions of httpd (2.2 or 2.4), please visit their documentations instead:
You may follow this link to go to the 2.2 version of this document.

Apache モジュール mod_asis

Available Languages:  en  |  ja  |  ko 

This translation may be out of date. Check the English version for recent changes.
説明:自分用の HTTP ヘッダの書かれているファイルを送信する
ステータス:Base
モジュール識別子:asis_module
ソースファイル:mod_asis.c

概要

このモジュールはハンドラ send-as-is を提供します。このハンドラは通常の HTTP ヘッダをほとんど追加することなくドキュメントを送信します。

これはサーバからどんな種類のデータを送るときにも使用できます。 Cgi スクリプトや nph スクリプトが無くてもリダイレクトや他の特別な HTTP 応答を送ることができます。

歴史的な理由により、このモジュールは mime タイプ httpd/send-as-is のファイルも処理します。

ディレクティブ

このモジュールにディレクティブはありません。

トピック

参照

top

使用法

サーバ設定ファイルで、ファイルと send-as-is ハンドラを例えば以下のように関連付けてください。

AddHandler send-as-is asis

拡張子が .asis のすべてのファイルの内容は Apache からクライアントへほとんど変更無く送られます。クライアントには HTTP ヘッダが必要ですので、ファイルに書くことを忘れないでください。 Status: ヘッダも必要です。データは 3 桁の HTTP 応答コードと、その後にテキストメッセージが続いたものでなければなりません。

これはクライアントにファイルが移動したことを知らせるために as is (そのまま) で送られるファイルの内容の例です。

Status: 301 Now where did I leave that URL
Location: http://xyz.abc.com/foo/bar.html
Content-type: text/html

<html>
<head>
<title>Lame excuses'R'us</title>
</head>
<body>
<h1>Fred's exceptionally wonderful page has moved to
<a href="http://xyz.abc.com/foo/bar.html">Joe's</a> site.
</h1>
</body>
</html>

注意

注意: サーバはクライアントに返されるデータに常に Date:Server: ヘッダを追加しますので、 それらがファイルに書かれていてはいけません。 サーバは Last-Modified ヘッダを追加しません。 おそらくはそうすべきでしょうけれど。

Available Languages:  en  |  ja  |  ko