httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nick Kew <n...@webthing.com>
Subject Re: [users@httpd] Force/add/append/inject HTML to documents (similar to 'Header append') for no archive
Date Sun, 19 Feb 2006 04:01:49 GMT
On Sunday 19 February 2006 01:50, Eugene wrote:
> On Sat, Feb 18, 2006 at 02:26:48PM CST, S.A. Birl 
<sbirl+Apache-List@concept.temple.edu> wrote:
> : Is it possible to have Apache 2.0.53 to append HTML information to
> : pages as they are being served out?  Similar to 'Header append', but
> : for the body?
> :
> : I looked at all of Add* modules on the website, and couldnt think of
> : anything that matches.  Im not sure if mod_asis or mod_cern_meta would
> : help.
>
> Apache doesn't do this by itself.

Indeedie.

> There are several template-ish 
> solutions involving mod_rewrite.

But not relevant to the question, unless you have hooks in place
(as in SSI).

> There's also a 3rd-party module 
> called mod_layout that does the trick too.

I'd point the OP at mod_publisher which, unlike mod_layout,
is markup-aware and won't risk breaking a page (and I'm not
sure how reliably mod_layout can find the right place to insert
contents).

On the other hand, preprocessing is probably better than any
solution using apache.

> : Or does someone know of an easy way to append
> : 	<META NAME="robots" CONTENT="noarchive">
> : to 100+ files?

If you have an easy-to-find hook (like the byte sequence "</head>")
just run a global edit, e.g. with perl.  I think it's safe to say that if
you can fix it with mod_layout, you can fix it more easily with a
simple perl one-liner.  But I'm willing to be proved wrong:-)

> You actually don't want to append.  That stuff needs to go in the
> <TITLE> section, which is at the top of the file.

YM the <head>

-- 
Nick Kew

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message