为每种类型的文件打印不同的头文件


printing different headers for each types of file

我正在寻找一个如何为每种类型的文件打印不同头的例子。

例如:

set the foo:baa in headers .png files.
set the foo:baa2 in headers .txt files

。等。

可以使用apache/。Htaccess还是一些。config文件?我希望这是清楚的。提前感谢

如何:

<IfModule mod_headers.c>  
    <Files "*.txt">  
        Header set Header-name "header content"
    </Files>  
</IfModule>

?