Skip to content

Commit a10a378

Browse files
committed
htrouter for local
1 parent b06f997 commit a10a378

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

.htrouter.php

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
$uri = urldecode(
6+
parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH)
7+
);
8+
9+
if ($uri !== '/' && file_exists(__DIR__ . '/public' . $uri)) {
10+
return false;
11+
}
12+
13+
$_GET['_url'] = $_SERVER['REQUEST_URI'];
14+
15+
require_once __DIR__ . '/public/index.php';

0 commit comments

Comments
 (0)