I have multiple web-apps running on a server using different technologies.
- java
- php (wordpress)
- python (trac)
They are all front-ended with Apache 2.2. My question is does anyone know a good way to wrap all these web apps with a common template (header/footer).
I was looking into mod_layout, but the documentation is quite limited and I was unable to get even the simplest example to work.
I also looked at mod_include, but I'm not sure if that is a good idea.
You can force all pages of a certain extension to include a header and footer by setting it out in the
httpd.conf
of the server, or just in the.htaccess
of each particular directory/site with the append and prepend directives like so:The above will match
.html
pages and will force include/path/to/header.html
before the page content as well as/path/to/footer.html
after the page.Just remove the
FilesMatch
lines if you want to force it on all pages.