# Search Bot w/ PHP template system?

**URL:** https://forum.kirupa.com/t/search-bot-w-php-template-system/159380
**Category:** programming
**Created:** [August 17, 2005, 2:54am UTC](https://forum.kirupa.com/t/search-bot-w-php-template-system/159380 "2005-08-17T02:54:52Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![bigmtnskier](https://avatars.discourse-cdn.com/v4/letter/b/a4c791/32.png) [@bigmtnskier](https://forum.kirupa.com/u/bigmtnskier)
#### Post date: [August 17, 2005, 2:54am UTC](https://forum.kirupa.com/t/search-bot-w-php-template-system/159380/1 "2005-08-17T02:54:52Z")

</div>

I have a content/template system (really simple one) The way it is set up is as follows:

There is one php script “index.php” that is used for displaying all pages. Each page is a seperate file that is then included in index.php?p=page. The way it loads a page is [color=Navy]$\_GET[/color][[color=DarkRed]‘p’[/color]]; For example:

```php

$pageid = $_GET['p'];
if (file_exists($pageid . ".php"){
   $pagetoload = $pageid . ".php";
}else{
   $pagetoload = "error404.htm";
}
include($pagetoload);

```

I was wondering… how will this work with search engines? Should I have the proper \<title\>data\</title\> and meta tags in each seperate file, then have it so that if a user accesses them via a search engine or other means it redirects them to the proper templated page? (index.php?p=thepage) But if I do that then the \<head\> block would be in the body block… unless I broke the \<body\> block into two…

Sorry if this doesn’t make much sense ☹ If you need me to re-explain it I would be happy to.

Thanks in advance for any help or guidance :hugegrin:  
-bigmtnskier
