实例如下,在我的一个示例项目中,我不想显示所有的.c文件,可以通过如下设置:
Alias /sample /opt/projects/Sample
<Directory /opt/projects/Sample>
Options Indexes FollowSymLinks MultiViews
Order Allow,Deny
Allow from all
</Directory>
<DirectoryMatch \.c>
Deny from all
Alias /sample /opt/projects/Sample
<Directory /opt/projects/Sample>
Options Indexes FollowSymLinks MultiViews
Order Allow,Deny
Allow from all
</Directory>
<DirectoryMatch \.c>
Deny from all
</DirectoryMatch>
本文转自博客园zhyiwww 的博客,原文链接:http://www.blogjava.net/zhyiwww/,如需转载请自行联系原博主。