【发布时间】:2011-01-05 14:00:43
【问题描述】:
我正在使用以下 .htaccess 来修饰我的目录列表:
Options +Indexes
IndexOptions IgnoreCase FancyIndexing FoldersFirst NameWidth=* DescriptionWidth=* SuppressHTMLPreamble
HeaderName header.html
IndexIgnore header.html footer.html favicon.ico .htaccess .ftpquota .DS_Store icons *.log *,v *,t .??* *~ *#
它加载包含以下内容的标题html:
<html><head><title>My Stuff</title>
<style type="text/css">
body {
background: #eee;
margin: 33px;
color: #333;
}
h1 {
font: 2.0em Georgia, serif;
}
h1 a:hover, h1 a:active {
text-decoration: none;
}
a:link {
text-decoration: none;
color: #555;
}
a:visited {
text-decoration: none;
color: #777;
}
a:hover, a:active {
text-decoration: underline;
color: maroon;
}
pre {
font: 0.9em/1.3em "Courier New", Courier;
margin: 3px 0;
color: #777;
}
pre img {
display: inline;
}
img {
margin: 3px 0;
}
</style>
</head>
<body><h1><a href="/test" title="My Atlassian Stuff">My Stuff</a></h1>
当我转到文件夹 /test/ 时,它看起来很棒。但是,当我转到/test/test2/ 时,它并没有拾取以前的 htaccess,从而显示出无聊的默认样式。我怎样才能让它对下层的子文件夹也有粘性/递归?
【问题讨论】: