| 1 | <?php |
| 2 | // Router for the local PHP development server; production uses .htaccess. |
| 3 | $path=rawurldecode(parse_url($_SERVER['REQUEST_URI'],PHP_URL_PATH)); |
| 4 | if (preg_match('~(?:^|/)(?:data|lib|tests|\.[^/]*)(?:/|$)|(?:README\.md|router\.php)$~i',$path)) { |
| 5 | http_response_code(403); exit('Forbidden'); |
| 6 | } |
| 7 | return false; |
projects-timfalken-com microchess