<?php
/**
 * simple mvc2 front-controller
 */
$FW = array(
	'default_app'		=>	'status',
	'default_used'		=>	false);
if(isset($_SERVER['PATH_INFO']) && preg_match('%/((?:[a-z0-9]+\.)*[a-z0-9]+)%i',$_SERVER['PATH_INFO'], $m)) {
	if(substr($_SERVER['PATH_INFO'],strlen($_SERVER['PATH_INFO'])-1) == '/') {
		header('Location: /'.$m[1]);
		return;
	}
	$application = $m[1];
	unset($m);
} else {
	$application = $FW['default_app'];
	$FW['default_used'] = true;
}
require '../fw/fw.inc';

