For now in SamsonCMS we need to manually fix this with this
/** Set current directory as project root /
if (!defined('SAMSON_CWD')) {
define('SAMSON_CWD', dirname(DIR) . '/');
}
/* Set current directory url base */
if (!defined('SAMSON_BASE') && strlen(DIR) > strlen($_SERVER['DOCUMENT_ROOT'])) {
define('SAMSON_BASE', '/'.basename(SAMSON_CWD) . '/');
}
this should be done automatically in framework