diff options
| author | Greg Roach <fisharebest@webtrees.net> | 2019-11-16 16:06:10 +0000 |
|---|---|---|
| committer | Greg Roach <fisharebest@webtrees.net> | 2019-11-16 16:06:10 +0000 |
| commit | 98116b24f349a13d59c9798d52b3efc6d56bfa47 (patch) | |
| tree | 11534671a37ca5f32e723ed8d51d17a663d4fdd8 /index.php | |
| parent | b972b8c97e1dc2a2c6177a5e17a260f556243431 (diff) | |
| download | webtrees-98116b24f349a13d59c9798d52b3efc6d56bfa47.tar.gz webtrees-98116b24f349a13d59c9798d52b3efc6d56bfa47.tar.bz2 webtrees-98116b24f349a13d59c9798d52b3efc6d56bfa47.zip | |
Fix: routing fails for URLs with port number. Add support for built-in server with pretty URLs.
Diffstat (limited to 'index.php')
| -rw-r--r-- | index.php | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -23,9 +23,20 @@ use Middleland\Dispatcher; use Nyholm\Psr7Server\ServerRequestCreator; use function app; +use function parse_url; + +use const PHP_SAPI; +use const PHP_URL_PATH; require __DIR__ . '/vendor/autoload.php'; +if (PHP_SAPI === 'cli-server') { + $file = parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH); + if (file_exists($file)) { + return false; + } +} + // Create the application. $application = new Webtrees(); $application->bootstrap(); |
