-
Notifications
You must be signed in to change notification settings - Fork 195
Added a recipe for base path resolution #238
Added a recipe for base path resolution #238
Conversation
Haha, I was about to start writing cookbook now :) |
@mtymek Beat you to it! You can now review this one. :) |
/* ... */ | ||
], | ||
'aliases' => [ | ||
// alias default UrlHelper with Blast\BaseUrl alternative |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just tried it on fresh skeleton installation, and was hit with following error:
An alias by the name "zendexpressivehelperurlhelper" or "Zend\\Expressive\\Helper\\UrlHelper" already exists'
Maybe you can indicate that default helper should be removed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note has been added now, @mtymek
Looks good (besides little elements I added) and works well - just tested it. |
|
||
The base path should be the portion of the web root leading up to the | ||
`index.php` of your application. In the above example, this would be | ||
`/expressive`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/expressive/public
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/expressive is correct - see paragraph about .htaccess.
With such approach you don't need to worry about protecting other folders with additional .htaccess files.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok 👍
This patch adds a recipe to the cookbook covering how to serve Expressive applications from subdirectories.
Fixes zendframework/zend-expressive-skeleton#51