Skip to content
This repository was archived by the owner on Nov 20, 2025. It is now read-only.

Commit 07fae7a

Browse files
author
Mischa Braam
committed
Fix bedrockvaletdriver #612
1 parent f58a7f6 commit 07fae7a

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

cli/drivers/BedrockValetDriver.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -49,15 +49,15 @@ public function frontControllerPath($sitePath, $siteName, $uri)
4949
{
5050
$this->loadServerEnvironmentVariables($sitePath, $siteName);
5151

52-
$_SERVER['PHP_SELF'] = $uri;
52+
$_SERVER['PHP_SELF'] = $uri;
53+
$_SERVER['SERVER_ADDR'] = '127.0.0.1';
54+
$_SERVER['SERVER_NAME'] = $_SERVER['HTTP_HOST'];
5355

54-
if (strpos($uri, '/wp/') === 0) {
55-
return is_dir($sitePath.'/web'.$uri)
56-
? $sitePath.'/web'.$this->forceTrailingSlash($uri).'/index.php'
57-
: $sitePath.'/web'.$uri;
58-
}
59-
60-
return $sitePath.'/web/index.php';
56+
return parent::frontControllerPath(
57+
$sitePath . '/web',
58+
$siteName,
59+
$this->forceTrailingSlash($uri)
60+
);
6161
}
6262

6363
/**

0 commit comments

Comments
 (0)