On Thu, 2005-03-17 at 08:32 -0500, Mark Weaver wrote:
so you're saying its better to have an AddType line for .html and .php?
Yes.
Why have the php engine process .html pages? it will be slower as the http requests will _never_ be handled by just apache, but always passed to php additionally, even when no php code exists. [unless it's chached someplace of course...]
I have the php engine processing .html pages so I can utilize that engine by embedding php within the .html pages. most of the time when I'm doing this it is to include or call for other pages in order to modularize certain aspects of a site.
EXAMPLE:
<div id="pagecell">
<div id="header"> <? include("header.html"); ?> </div>
<div id="sidebar"> <? include("menu.html"); ?> </div>
<div id="content"> ... </div>
<div id="footer"> <? include("footer.html"); ?> </div> </div>
Now I'm free to deal mainly with what goes in the content area; my header and footer is always the same on every page unless I call for a different page for those areas. If I happen to be developing a cookie based menu system for a site or web app that requires access restrictions based on user types I can use a php based menu system that does cookie checking in which case the menu page that gets loaded is the same file each time, but only shows what the user has access to on the menu. in which case menu.html would be menu.php.
using the php engine in this fashion I can embed small include statements or an entire block of full blown php - what ever pleases me or meets the need at the time and I'm not locked into making sure my extensions are all .php.
-- Mark ----------------------------------------------------------- Paid for by Penguins against modern appliances(R) Linux User Since 1996 Powered by Mandrake Linux 8.2, 10.0 & RH Fedora Core 3