I currently have a rewrite solution setup on my site but as I am adding more and more pages the directory is becoming a little complicated. My setup is below for illustration:
index.php
<?php
$page = isset($_GET['p']) ? $_GET['p'] : 'main';
switch($page) {
case 'contact':
$title = 'foo';
$keyword = 'bar';
$description = 'foobar';
$stylesheet = '../style.css'; break;
include($_SERVER['DOCUMENT_ROOT'].'/include/header.php');
include($_SERVER['DOCUMENT_ROOT'].'/host/'.$page.'.php');
include($_SERVER['DOCUMENT_ROOT'].'/include/rightnav.php');
include($_SERVER['DOCUMENT_ROOT'].'/include/footer.php');
?>
.htaccess
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^host/([\w]+) /index.php?p=$1 [L]
So at the moment all my content files are in a directory called "content".
My question is how can I split the files up into different directories using the same mod_rewrite technique if you get my meaning.