X-Git-Url: https://yaffs.net/gitweb/?a=blobdiff_plain;f=web%2F.ht.router.php;h=054f7119b0eadf8955b3048a2c5aaad14257829a;hb=1c1cb0980bfa6caf0c24cce671b6bb541dc87583;hp=3da80a17f2baf57fb40c2e57fbb1b9547e1486e6;hpb=9424afc6c1f518c301bf87a23c047d1873435d05;p=yaffs-website diff --git a/web/.ht.router.php b/web/.ht.router.php index 3da80a17f..054f7119b 100644 --- a/web/.ht.router.php +++ b/web/.ht.router.php @@ -25,7 +25,7 @@ */ $url = parse_url($_SERVER['REQUEST_URI']); -if (file_exists('.' . $url['path'])) { +if (file_exists(__DIR__ . $url['path'])) { // Serve the requested resource as-is. return FALSE; } @@ -38,7 +38,7 @@ if (strpos($path, '.php') !== FALSE) { // fallback to index.php. do { $path = dirname($path); - if (preg_match('/\.php$/', $path) && is_file('.' . $path)) { + if (preg_match('/\.php$/', $path) && is_file(__DIR__ . $path)) { // Discovered that the path contains an existing PHP file. Use that as the // script to include. $script = ltrim($path, '/');