mirror of
https://github.com/laravel/valet.git
synced 2026-02-04 16:10:08 +01:00
Merge pull request #1289 from EHLOVader/fix-bedrockvaletdriver
Fix bedrockvaletdriver
This commit is contained in:
@@ -48,19 +48,14 @@ public function isStaticFile($sitePath, $siteName, $uri)
|
|||||||
public function frontControllerPath($sitePath, $siteName, $uri)
|
public function frontControllerPath($sitePath, $siteName, $uri)
|
||||||
{
|
{
|
||||||
$_SERVER['PHP_SELF'] = $uri;
|
$_SERVER['PHP_SELF'] = $uri;
|
||||||
|
$_SERVER['SERVER_ADDR'] = '127.0.0.1';
|
||||||
$_SERVER['SERVER_NAME'] = $_SERVER['HTTP_HOST'];
|
$_SERVER['SERVER_NAME'] = $_SERVER['HTTP_HOST'];
|
||||||
|
|
||||||
if (strpos($uri, '/wp/') === 0) {
|
return parent::frontControllerPath(
|
||||||
return is_dir($sitePath.'/web'.$uri)
|
$sitePath.'/web',
|
||||||
? $sitePath.'/web'.$this->forceTrailingSlash($uri).'/index.php'
|
$siteName,
|
||||||
: $sitePath.'/web'.$uri;
|
$this->forceTrailingSlash($uri)
|
||||||
}
|
);
|
||||||
|
|
||||||
if ($uri !== '/' && file_exists($sitePath.'/web'.$uri)) {
|
|
||||||
return $sitePath.'/web'.$uri;
|
|
||||||
}
|
|
||||||
|
|
||||||
return $sitePath.'/web/index.php';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user