Problem/Motivation
The current version of .ht.router.php does not work in conjunction with drupal-project. The script causes an redirect loop if it invoked from the project root.
php -S localhost:8888 -t web web/.ht.router.php
The root cause it the different cwd. getcwd() returns the project root and not the Drupal root.
Proposed resolution
Add chdir at the beginning of the script, or replace file_exists('.' . $url['path']) with file_exists(__DIR__ . $url['path'])
Remaining tasks
User interface changes
API changes
Data model changes
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | 2970132-5.patch | 699 bytes | neerajsingh |
Comments
Comment #2
webflo commentedThe is another
is_filein the script.Comment #3
cilefen commentedThis seems like something on which novices could make progress. I removed the “composer” tag because as far as I can tell, Composer isn’t involved in the bug.
Comment #4
neerajsinghworking on patch to have PHP constant
__DIR__.Comment #5
neerajsinghAttached patch for review.
Comment #6
neerajsinghComment #7
webflo commentedThank you, look good.
Comment #8
alexpottCrediting @webflo for reporting and reviewing the issue.
Comment #9
alexpottCommitted and pushed 4ed1bcf646 to 8.6.x and 797b4bc250 to 8.5.x. Thanks!