Fix subdirectory multisite wp-login.php routing and align $wpSiteUrl default#6
Open
KreigD wants to merge 2 commits intofanaticdesign:masterfrom
Open
Fix subdirectory multisite wp-login.php routing and align $wpSiteUrl default#6KreigD wants to merge 2 commits intofanaticdesign:masterfrom
KreigD wants to merge 2 commits intofanaticdesign:masterfrom
Conversation
Set default $wpSiteUrl to an empty string to match README guidance for vanilla installs
Include wp-login.php in URI normalization inside frontControllerPath() (same branch as wp-admin/wp-content/wp-includes).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR fixes an edge case in Herd/Valet subdirectory multisite routing where subsite login URLs can be routed as front-end page requests instead of the core login script.
Problem
In subdirectory multisite setups, requests like:
should resolve to core admin/login behavior for that subsite.
The driver already normalizes
wp-admin,wp-content, andwp-includes, but notwp-login.phpinsidefrontControllerPath().In Herd/Valet,
.phphandling goes through front controller resolution logic, so missingwp-login.phpnormalization can cause:Changes
Normalize
wp-login.phpinfrontControllerPath()Include
wp-login.phpin the same URI normalization branch used forwp-admin,wp-content, andwp-includes.Align default
$wpSiteUrlwithREADMEguidanceChange default from
"/"to""for vanilla installs (as documented in README), reducing path concatenation ambiguity.Why this is safe
wp-login.phpis a core path in the same family as other normalized WordPress core routes.Reference
Observed and reproduced on Laravel Herd with WordPress multisite subdirectory install.