-
apache question
Hello,
I'm wondering if there's a way in apache to dynamically prepend a text or html file to a html file being served in a specific directory. In other words, in /stuff, all files requested would automatically have the file foo.htm prepended to that document. I hope I made that clear.
Is there a way to do that without editing each file? (like an apache config directive or such) and besides SSI...?
-
Id hope I understood it correctly, but there is some piece of javascript or maybe html even that let's you insert another pages code... I don't remember, but it was something with <insert or <include ... I have to look that up a bit.
-
I think neel is takling about the PHP include() function. That would work, but you have to edit all files in that directory to include this line:
PHP Code:
<?php include("foo.php") ?>
-
Yeah php has that, but I thought he was talking about html... I thought there was something similar in javascript, I only don't remember because I don't use javascript anymore for the things that php can do for me.
-
For html solution, see some examples of dynamic html using javascript in http://www.dynamicdrive.com/dynamicindex17/index.html
to get some ideas. Specifically learn about the src property of an iframe.
But again, yes, this means editing each file to insert some codes. The original question was asking how to do it w/o editing each file by utilizing apache directive or such. Oh well, i'm not aware of any other way. Sorry. ;)
Peace always,
<jdenny>