Skip to content

Commit

Permalink
Merge pull request #1471 from Werbschaft/patch-1
Browse files Browse the repository at this point in the history
Update KirbyValetDriver.php
  • Loading branch information
mattstauffer authored May 31, 2024
2 parents d3a6e9f + 40c6b28 commit 3003ccb
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions cli/Valet/Drivers/Specific/KirbyValetDriver.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,17 @@ public function frontControllerPath(string $sitePath, string $siteName, string $
$indexPath = $sitePath.'/panel/index.php';
}

// add this block
if (preg_match('/^\/(?!(kirby|site|content)\/).+\.php$/', $uri)) {
if (
$this->isActualFile($sitePath.$uri) ||
$isAboveWebroot && $this->isActualFile($sitePath."/public".$uri)
) {
$scriptName = $uri;
$indexPath = $sitePath.$scriptName;
}
}

$sitePathPrefix = ($isAboveWebroot) ? $sitePath.'/public' : $sitePath;

$_SERVER['SERVER_NAME'] = $_SERVER['HTTP_HOST'];
Expand Down

0 comments on commit 3003ccb

Please sign in to comment.