Hi, I’m trying to build a small site for my development section of my site but I need some help.
This is the current code:
<?php
// This document contains the possible switches for this site.
// Site switches.
if (isset($_GET['page'])) $PAGE = $_GET['page'];
else $PAGE = 'index';
switch ($PAGE) {
//1- index
case 'index':
include ("static/index.shtml");
break;
case 'page1':
echo "Test";
break;
//Error Document
default:
include ("static/error.shtml");
break;
}
// Development Sites.
if (!isset($_DEVELOPMENT['site'])) $DEV = $_DEVELOPMENT['site'];
switch ($DEV) {
//2- phpbb2
case 'phpbb':
header ("Location: forums/phpbb/");
break;
//3- smf
case 'smf':
header ("Location: forums/smf/");
break;
//4- xmb
case 'xmb':
header ("Location: forums/xmb/");
break;
}
?>
I want to be able to use ?site=site to redirect the user to the site and use ?page=page for internal pages. I want all the php in one document and the internal pages in html files placed in another folder.
I know it can be done, I just don’t know how. Please help…