I am currently devloping a site and I'm at somewhat of a crossroads really. As it stands, the site consists of all html pages which are generated by PHP when an update is run by one of the site administrators (they aren't all updated, just the ones that are changed). This was done for three reasons:
a) I've reduced server load by not requiring the PHP parser and DB activities on each page
b) Caching purposes
c) The .html pages look better in seacrh engines.
Now, the problem is I know want to work with logins (cookies or sessions, whatever) and this obviously requires some dynamic code to do. This is where I'm not sure what I want to do. hatever I do, I will need some PHP code to handle the login stuff, but I'm looking for the best way to do it. If I have to turn all my pages to .php pages I lose all of the advantages I previously mentioned. I'm aware of mod_rewrite, but the problem with that is I will still lose advantages a and b since with mod_rewrite the last modified time isn't sent properly.
The question I really have, is whether it is possible to keep caching and the .html extensions while at the same time doing some dynamic code on every page. Like, is it possible to say perhaps have a PHP script run on every page request to process logins then either feed the information into a cookie to be processed by JS or perhaps somehow display. Or, is it perhaps possible to use PHP, but preserve caching capabilities (ie fix the last modified issue with mod_rewrite). As an example, just looking at www.gamespot.com a site I visit fairly often, their login credentials are passed from page to page yet the page properties show me a proper modiefied date and that this is in fact an html page.
Long post, but hopefully someone can decipher it and help me out
Thanks,
Carl