Re: Apache server-side includes questions
On Thu, 29 May 1997, Pete Templin wrote:
> Hello,
>
> Somewhere along the line, my tricks (hacks?) for doing server-side
> inclusion of standardized (and separately changeable) headers and footers
> on web pages broke. I admit to not knowing the _right_ way to do it,
> having stolen lots of bits and pieces along the way and learning
> originally on the ncsa server on my school's DEC box.
>
> Here's what I'm currently doing:
>
> <!--#exec cmd="./header"-->
>
> is in the page.
>
> I had an .htaccess file that looked like this:
>
> AddType text/x-server-parsed-html .html
Use AddHandler server-parser .html instead, this will fix everything.
> Options All
>
> I've basically NOT touched the srm.conf file of my "frozen" version of
> apache. I have uncommented two lines, but recommented them for testing
> purposes.
>
> If I attempt to view the page on Netscape under Debian, I am prompted to
> save the file to my home directory.
Because netscape doesn't understand text/x-server-parsed-html - it should
be text/html.
>
> What's the Right Way(tm) to include the output of a perl script into a web
> page?
As you were doing it. Or, use a CGI, and point it at a "target" frame :)
PS. the perl script you had there can be done without using perl:
<!--#include "blah" --> instead. Blah can <!--#echo var=LAST_MODIFIED -->.
Much quicker, less resource-hungry.
--
Tom Lees <tom@lpsg.demon.co.uk> http://www.lpsg.demon.co.uk/
PGP ID 87D4D065, fingerprint 2A 66 86 9D 02 4D A6 1E B8 A2 17 9D 4F 9B 89 D6
finger tom@master.debian.org for full public key (also available on keyservers)
--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
debian-devel-request@lists.debian.org .
Trouble? e-mail to templin@bucknell.edu .
Reply to: