Skip to content

Commit 3003ccb

Browse files
authored
Merge pull request #1471 from Werbschaft/patch-1
Update KirbyValetDriver.php
2 parents d3a6e9f + 40c6b28 commit 3003ccb

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

cli/Valet/Drivers/Specific/KirbyValetDriver.php

+11
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,17 @@ public function frontControllerPath(string $sitePath, string $siteName, string $
4848
$indexPath = $sitePath.'/panel/index.php';
4949
}
5050

51+
// add this block
52+
if (preg_match('/^\/(?!(kirby|site|content)\/).+\.php$/', $uri)) {
53+
if (
54+
$this->isActualFile($sitePath.$uri) ||
55+
$isAboveWebroot && $this->isActualFile($sitePath."/public".$uri)
56+
) {
57+
$scriptName = $uri;
58+
$indexPath = $sitePath.$scriptName;
59+
}
60+
}
61+
5162
$sitePathPrefix = ($isAboveWebroot) ? $sitePath.'/public' : $sitePath;
5263

5364
$_SERVER['SERVER_NAME'] = $_SERVER['HTTP_HOST'];

0 commit comments

Comments
 (0)