httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Boyle Owen" <>
Subject RE: [users@httpd] Adding banners
Date Mon, 18 Aug 2003 07:31:55 GMT
>-----Original Message-----
>From: Cody Harris []
>Is there or isn't there a way to dump a file into another (i'm 
>ignoring all
>html rules here, all i want is a way to dump one file into another with

What a brilliant thread! But no need for a flame war, I think...

To get back to the original poster's question - he wants to stick a bit
of HTML into thousands of pages, automatically. I guess he's looking for
a simple directive like:

<Files *>
	AddHTMLCode /path/to/banner.html

Unfortunately, there's no such thing. So the answer to the question
above is "no".

You may have been thinking of the "HeaderName" directive which allows
you to specify an HTML file to be inserted into the default page apache
uses when building a directory index. This is a highly specialised
feature and is useful only with this one application - not what you

Although you can't do this directly with Apache, as has been described
on the list, there are several ways to do it using a variety of
third-party technologies:

- write a perl program that opens and edits all your pages in a big loop
(so you hard edit them once only).
- pass the request to a CGI which gets the file and inserts the banner.
- use a filter to get the file and insert the banner
- use CSS (although there seems to be some debate about the
possibilosity of this).
- Although you excluded it, SSI is the canonical way to do things like

So no way to do it without a reasonably substantial programming effort.
Incidentally, if you're wondering why there isn't a "AddHTMLCode"
directive like I invented above, I think that the main problem would be
deciding *where* to insert the HTML. You'd need some pattern-matching to
identify the insert position and, if you've ever used mod_rewrite,
you'll know how complicated that can become. If you try this with a
program, you'll probably find that this will be the trickiest part to

Owen Boyle
Disclaimer: Any disclaimer attached to this message may be ignored. 

Diese E-mail ist eine private und persönliche Kommunikation. Sie hat
keinen Bezug zur Börsen- bzw. Geschäftstätigkeit der SWX Swiss Exchange.
This e-mail is of a private and personal nature. It is not related to
the exchange or business activities of the SWX Swiss Exchange. Le
présent e-mail est un message privé et personnel, sans rapport avec
l'activité boursière de la SWX Swiss Exchange.

This message is for the named person's use only. It may contain
confidential, proprietary or legally privileged information. No
confidentiality or privilege is waived or lost by any mistransmission.
If you receive this message in error, please notify the sender urgently
and then immediately delete the message and any copies of it from your
system. Please also immediately destroy any hardcopies of the message.
You must not, directly or indirectly, use, disclose, distribute, print,
or copy any part of this message if you are not the intended recipient.
The sender's company reserves the right to monitor all e-mail
communications through their networks. Any views expressed in this
message are those of the individual sender, except where the message
states otherwise and the sender is authorised to state them to be the
views of the sender's company. 

The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message