Skip to content

fix: serve the home page and the admin address under Valet and Herd - #521

Merged
ogorzalka merged 3 commits into
developfrom
fix/valet-front-controller
Oct 21, 2026
Merged

ogorzalka merged 3 commits into
developfrom
fix/valet-front-controller

Conversation

@ogorzalka

Copy link
Copy Markdown
Member

Part of #513.

Measured on macOS 15 (EC2 Mac, PHP 8.4, Valet 4.12, framework 13.38.0):

  • / answered a 302 to itself. Valet runs the site through its own server.php, which includes public/index.php, so SCRIPT_FILENAME is not the front controller; laravelIsServingTheRequest() said no and guardAgainstRawTemplateOutput() redirected to the home URL. A front controller PHP has included now counts.
  • /cms/wp-admin/ (printed by pollora:install) answered 404: Valet hands every URL that is not a file to the front controller. A request for a public/ directory with an index.php is redirected to that file.

After both changes, on the same Mac: / 200, /cms/wp-admin/ → index.php → login, no redirect loop, WordPress pages and 404 unchanged.

Tests: new cases in LaravelServingRequestTest, new PublicDirectoryIndexRedirectTest; PHPStan clean. 11 Feature tests (async/database queue) fail the same way on develop in my environment.

@ogorzalka
ogorzalka merged commit 56905fa into develop Oct 21, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant