Welcome to WebmasterWorld Guest from 54.242.134.77

Forum Moderators: mademetop

Message Too Old, No Replies

php header and footer configurations

php header and footer, search engine promotion

     

layer8

3:17 am on Jan 17, 2005 (gmt 0)

10+ Year Member



Hi,

Im thinking of using one header.php and one footer.php for my website to ease mamangement and create a consistant template throughout my website.

Anyone know if this is bad for search engine promotion?

chrisgarrett

11:16 am on Jan 17, 2005 (gmt 0)

10+ Year Member



I do this and variations all the time. It is standard practice. I presume you are worried about duplicate content penalties? I wouldn't worry so much, just make sure you are not loading the page down with too much unnecessaryness :O) Look at this site, webmasterworld, and how well it does in the serps. Standard template and no penalties ..

encyclo

1:30 pm on Jan 17, 2005 (gmt 0)

WebmasterWorld Senior Member encyclo is a WebmasterWorld Top Contributor of All Time 10+ Year Member



There's no problem with this - but make sure that your
<title>
is different for each page, as well as the meta description and keywords if you use them. You can use a variable at the top of each page to echo the values you want in the right place, for example:

<?php $pagetitle="page title";
$keywords="list of meta keywords";
$description="your meta description here";
include($_SERVER["DOCUMENT_ROOT"]."/includes/header.inc.php");?>

<p>your page content here...</p>

<?php include($_SERVER["DOCUMENT_ROOT"]."/includes/footer.inc.php");?>

And in your header.inc.php:

<?php header('Content-Type: text/html; charset=ISO-8859-1');
header('Content-Language: en');?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">

<html>
<head>

<title>WidgetsCo<?php if (isset($pagetitle)) {echo " - ".$pagetitle;}?></title>

<?php if (isset($description)) {
echo "<meta name=\"description\" content=\"".$description"\">";}?>

<?php if (isset($keywords)) {
echo "<meta name=\"keywords\" content=\"".$keywords"\">";}?>

<style type="text/css" media="all">@import "styles.css";</style>

</head>
<body>

chrisgarrett

5:42 pm on Jan 17, 2005 (gmt 0)

10+ Year Member



Yup, I usually draw all the content out of a database and roll a simple cms to populate the data.
 

Featured Threads

Hot Threads This Week

Hot Threads This Month