I am creating a website for a client. Most pages are static other than a simple contact form. It is being hosted on a Fedora server running Apache.
All pages have the same header and footer. I want to use some sort of templating for maintainability. What do you recommend for me to use and why? Also, some quick examples would not hurt.
I am mainly a Python developer (Django) but I do have experience in PHP. I’m assuming PHP would be the way to go since it is pretty easy to get up and going on Apache.
My criteria:
- Very lightweight
- Easy to install (either via
yumor a quick download) - Pretty URLs (i.e., no
index.php?page=about)
Thank you in advance.
Server Side Includes are about as basic as you can get and are perfect for a mostly static site:
http://httpd.apache.org/docs/2.0/howto/ssi.html
That link will show you how to config the server for it and then you’d use a syntax such as:
If the server is running PHP, you can also use PHP includes:
http://php.net/manual/en/function.include.php