did you bother to go here?
http://httpd.apache.org/docs-2.0/mod/mod_rewrite.html
Dunno man...
But,check this out:
<?
include('_inc/invoke.inc');
if ((@constant('user') == 'register') && empty($GLOBALS['uName'])) {
$GLOBALS['REGISTER'] = new Register;
}
if (isset($GLOBALS['uName'])) {
switch ($GLOBALS['uMode']) {
case 'appraiser' :
switch (@constant('view')) {
case 'coverage' :
$myCoverage = new CoverageMan;
break;
case 'reqs':
if (!defined('action') || @constant('action') == 'details') {
$myOrders = new orderMan;
if (!@constant('orderID') && !@constant('propID')) {
$myOrders->list_reqd_orders();
} else {
if (@constant('orderID')) {
$myOrders->orderDetails();
}
elseif (@constant('propID')) {
$propertyMan = new propertyMan;
$propertyMan->propertyDetails();
} else { //then toss a page not found...
$this->parseTemplate(COMMON_PATH.'tmpl/user_prompts/404.tmpl',
'CONTENT_BODY');
}
}
} else { //then we have an action taking place....
$appraisalMan = new appraisalMan;
$appraisalMan->viewReqs();
}
break;
case 'orders':
$orderMan = new orderMan;
switch (action) {
case 'details':
$orderMan->orderDetails();
break;
//case 'edit':
//$orderMan->editForm();
//break;
case 'upload':
$orderMan->uploadOrder();
break;
default:
$orderMan->list_open_orders();
}
break;
default :
$homePage = new userHome;
} // end switch(view)
break;
default : // these are the agent actions...
switch (@constant('view')) {
case 'property' :
$propertyMan = new propertyMan;
switch (@constant('action')) {
case 'details':
$propertyMan->propertyDetails();
break;
case 'edit':
$propertyMan->editForm();
break;
case 'update':
$propertyMan->updateProperty();
break;
default :
$propertyMan->listProperties();
break;
}
break;
case 'orders':
$orderMan = new orderMan;
switch (@constant('action')) {
case 'details':
$orderMan->orderDetails();
break;
case 'edit':
$orderMan->editForm();
break;
case 'update':
$orderMan->updateOrder();
break;
default:
$orderMan->list_open_orders();
}
break;
default :
$homePage = new userHome;
}
} // end switch(uMode)
} else { // they must login....
$this->parseTemplate(COMMON_PATH.'tmpl/forms/click_appraiser.tmpl','ADD_TYPE');
$user_auth->reqLogin();
}
include('_inc/footer.inc');
// Thus ends the section module
?>
Now this is off a production site that uses the concept I described earlier. This is an Object module that handles 1 location within the site. Lots of "if's" going on there.
And it's pretty complex as it is, since everything slips in and out of objects that are transparent and omnipresent.
Think about how complex this script would look if it included all 4 other sections of the site...
And this is template based, with no echos or HTML in anything. With complete abstraction of every major piece of logic.
So be careful about how you go about things here.
Not trying to bash on you though, just hoping to save you some pain later on down the road.