Commit 07f3550
committed
fix(envlite): resolve router paths via DOCUMENT_ROOT
The router previously used dirname(__DIR__, 2) . '/src' to locate both
the static-file root and the front controller. That resolves relative
to the router file's own checkout, so invoking envlite from a different
worktree loaded the wrong wp-config.php and triggered a canonical-URL
301 to that wp-config's WP_HOME port.
Use $_SERVER['DOCUMENT_ROOT'] instead — populated by php -S from its
-t flag, which envlite_run_dev_server already points at the target
repo's src/.1 parent 28c6332 commit 07f3550
1 file changed
Lines changed: 6 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
12 | 16 | | |
13 | 17 | | |
14 | 18 | | |
| |||
22 | 26 | | |
23 | 27 | | |
24 | 28 | | |
25 | | - | |
| 29 | + | |
0 commit comments