to get a footer on every html page would it be better to use a htaccess file or amod rewrite? if so how? I have seen turoials on how to use it for including php pages on php pages but not html with html
thanks!
to get a footer on every html page would it be better to use a htaccess file or amod rewrite? if so how? I have seen turoials on how to use it for including php pages on php pages but not html with html
thanks!
Well would it not make more sense to make an includes files? when you have designed your pages in html I think it's always better to save as .php.
so make your includes file and call it footer.php and stick that in an includes folder.
Lets for example use a basic footer.
Thats a basic footer design, in a simple table, anyway thats your includes file, now on the page you wish to add this to, all you need to do is link to this page with a footer tag.<table align="center" style="margin-top:10px; margin-bottom:20px;">
<tr>
<td>Copyright divisions post example All Rights Reserved © 2008. Registered </td>
</tr>
</table>
Example.and that will show on every page you add that to<?php include("../includes/footer.php"); ?>![]()
You can add a line to your .htaccess to have it parse .htm or .html for PHP if you have includes in all your pages.
Don't use tables like that as that is not tabular data and so doesn't belong in a table (that method was the 20th century way of setting out pages before style sheets were introduced 10 years ago. Place the footer in a div and style it from your style sheet.
Adding the line when only some of your pages have PHP in them would slow down all the pure HTML pages unnecessarily as the PHP parser would need to examine every line of those files looking for PHP before delivering them to the browser. If you are only using PHP on some pages then you are better off to just use a .php extension for those pages.
If you do use PHP in all your .html pages then the following lines in the .htaccess will handle it.
Code:AddType application/x-httpd-php .html AddHandler application/x-httpd-php .html