Feel free to ignore this if you're not a web development type. If you are, it should be a simple question, but I don't know the answer.
I'm re-doing this website, as you've seen, and I'm using some PHP includes. On pages that end with a .php extension (instead of .html or something else), that works great. It's why you see the navigation sidebar and the footer at the bottom of the page on the home page and monthly archives (they're really only single files that get sucked into each page as it loads):
https://www.penmachine.com/index.php
https://www.penmachine.com/old/2007_05_01_.php
But for some reason, Blogger is generating individual post pages without extensions, like this:
https://www.penmachine.com/2007/05/dont-cheese-off-geeks
https://www.penmachine.com/labels/encryption
By default, the Apache web server software I'm using treats these files as plain text (showing all the code gobbledegook), but I want them to be treated as PHP, so I tried editing the .htaccess file thus:
DefaultType application/x-httpd-php
But that creates a 500 Server Error. Strangely, this works:
DefaultType text/html
So you see the pages above properly as HTML web pages, but of course they don't have the sidebar includes, because Apache doesn't know they're supposed to be PHP.
What am I doing wrong? Is there a better way to approach this problem? All I want is for Apache to say, "Ah, a URL with no file extension—that's PHP," then the rest should Just Work, as it does for files ending in .php.
Suggestions?
Labels: design, geekery, php, redesign, relaunch