BlueGit

projects-timfalken-com microchess

Files

microchess / web / router.php

router.php

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