<?php
/**
 * PHP Built-in Dev Server Router
 */
$uri = urldecode(parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH));

if ($uri !== '/' && file_exists(__DIR__ . $uri)) {
    return false; // Serve static file directly
}

if ($uri === '/robots.txt') {
    require __DIR__ . '/robots.php';
    exit;
}

if ($uri === '/sitemap.xml') {
    require __DIR__ . '/sitemap.php';
    exit;
}

if ($uri === '/admin' || $uri === '/admin/') {
    require __DIR__ . '/admin.php';
    exit;
}

if ($uri === '/iletisim' || $uri === '/iletisim/') {
    require __DIR__ . '/iletisim.php';
    exit;
}

require __DIR__ . '/index.php';
