httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Boyle Owen" <>
Subject RE: [users@httpd] Auto Adding Header Text to HTML doc
Date Tue, 15 Oct 2002 08:50:03 GMT
You're looking for a directive like:

IncludeInFilesMatch *.html "<b>New included text!</b>"

...there ain't no such thing. Apart from not currently existing, I'm not
sure such a thing is even possible - how would apache know where to put
the new string, for one thing?

Apache is basically a file server. It doesn't modify files itself but,
rather, uses handlers to modify them. To include data dynamically, you
have to use SSI, CGI, PHP or some other server-sided processing.

On the other hand, if your files have a common structure, it is quite
easy to do a quick replacement with sed or perl, e.g.

$ sed -e "s/old text/new text" < file.html > temp && mv temp file.html

>-----Original Message-----
>From: Henrik Hudson []
>Sent: Montag, 14. Oktober 2002 18:18
>Subject: [users@httpd] Auto Adding Header Text to HTML doc
>Morning List-
>I would like to be able to add a single line to all HTML pages served 
>out, but don't wish to actually modify those pages. ie: SSIs 
>aren't going 
>to work, since if I have to add the SSI directive to every 
>page I might 
>as well just add my single script line. Since we have many different 
>people uploading and downloading and some don't know how to 
>add a single 
>line to HTML if it isn't in their WYSIWYG I was wondering if I can 
>somehow do this via a htaccess file directive.
>I am running 1.3.27 on FreeBSD 4.4 with most modules and can 
>add more if 
>Henrik Hudson
>---FreeBSD is like a Wigwam: no Windows, no Gates, Apache inside. 
>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:

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