deliver.php
<?php
\DM::require('redbean');
// define( 'REDBEAN_MODEL_PREFIX', '\\RDBModel\\' );
// define( 'REDBEAN_OODBBEAN_CLASS', '\\RDBBean\\CustomProps' );
$path = parse_url($_SERVER['REQUEST_URI'],PHP_URL_PATH);
$file = __DIR__.'/pub/'.$path.(pathinfo($path,PATHINFO_EXTENSION)=='' ? '.php' : '');
require($file);
// if (file_exists($file)){
// require($file);
// }