xiaowang/kirby/router.php

13 lines
317 B
PHP
Raw Normal View History

2021-10-29 18:05:46 +02:00
<?php
$root = dirname(__DIR__);
// https://yourdomain.com/media/super/nice.jpg
if (file_exists($root . '/' . $_SERVER['SCRIPT_NAME'])) {
return false; // serve the requested resource as-is.
}
$_SERVER['SCRIPT_NAME'] = str_replace($_SERVER['DOCUMENT_ROOT'], '', $index = $root . '/index.php');
include $index;