Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

TorgoX (1933)

TorgoX
  sburkeNO@SPAMcpan.org
http://search.cpan.org/~sburke/

"Il est beau comme la retractilité des serres des oiseaux rapaces [...] et surtout, comme la rencontre fortuite sur une table de dissection d'une machine à coudre et d'un parapluie !" -- Lautréamont

Journal of TorgoX (1933)

Saturday May 11, 2002
05:06 PM

Fancy Apache Tricks

[ #4857 ]

Fancy Apache tricks:

In the <IfModule mod_autoindex.c> section of httpd.conf, add:
   HeaderName /.index_header
(instead of "HeaderName HEADER")

Then in htdocs, create an .index_header.html file consisting of just:
  <link rel="stylesheet" type="text/css" href="/.index.css">
And maybe add a
  <meta name="robots" content="NOINDEX, NOFOLLOW">
line too.

Then still in htdocs, create an .index.css file consisting of:
BODY {
  background-color: black;
  color: white;
}

A:link { color: #6060FF }
A:visited { color: #A060FF }
A:active { color: #FF9090 }

ADDRESS {
  font-family: sans-serif;
  text-decoration: none;
  text-align: right;
  color: #303030;
}

What this all does:

* Pretty colors for all directory listings, via the stylesheet!

* Suppresses the annoying "<H1>Index of /foo/bar/baz/quux_quux_quux</H!>" thing. Those things annoy me because they're redundant next to what shows up the <TITLE>...</TITLE> as well as in the current URL; and because they stretch the screen out if "/foo/bar/baz/quux_quux_quux" is particularly long and has no spaces in it.

The downside: You can't use HEADER.html files, as you could before.

Also, on an unrelated point, in httpd.conf, most people can get away with changing
   IndexOptions FancyIndexing
to
   IndexOptions SuppressDescription FancyIndexing
...since few people ever use that Description field.

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.