Skip to content

Commit

Permalink
Fix bedrockvaletdriver #612
Browse files Browse the repository at this point in the history
  • Loading branch information
mischabraam committed Nov 29, 2022
1 parent f58a7f6 commit 07fae7a
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions cli/drivers/BedrockValetDriver.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,15 +49,15 @@ public function frontControllerPath($sitePath, $siteName, $uri)
{
$this->loadServerEnvironmentVariables($sitePath, $siteName);

$_SERVER['PHP_SELF'] = $uri;
$_SERVER['PHP_SELF'] = $uri;
$_SERVER['SERVER_ADDR'] = '127.0.0.1';
$_SERVER['SERVER_NAME'] = $_SERVER['HTTP_HOST'];

if (strpos($uri, '/wp/') === 0) {
return is_dir($sitePath.'/web'.$uri)
? $sitePath.'/web'.$this->forceTrailingSlash($uri).'/index.php'
: $sitePath.'/web'.$uri;
}

return $sitePath.'/web/index.php';
return parent::frontControllerPath(
$sitePath . '/web',
$siteName,
$this->forceTrailingSlash($uri)
);
}

/**
Expand Down

0 comments on commit 07fae7a

Please sign in to comment.