Skip to content
This repository has been archived by the owner on Jan 29, 2020. It is now read-only.

Added a recipe for base path resolution #238

Merged
merged 5 commits into from
Dec 22, 2015

Conversation

weierophinney
Copy link
Member

This patch adds a recipe to the cookbook covering how to serve Expressive applications from subdirectories.

Fixes zendframework/zend-expressive-skeleton#51

@weierophinney weierophinney added this to the 1.0.0rc5 milestone Dec 21, 2015
@weierophinney weierophinney self-assigned this Dec 21, 2015
@mtymek
Copy link
Contributor

mtymek commented Dec 21, 2015

Haha, I was about to start writing cookbook now :)

@weierophinney
Copy link
Member Author

@mtymek Beat you to it! You can now review this one. :)

/* ... */
],
'aliases' => [
// alias default UrlHelper with Blast\BaseUrl alternative
Copy link
Contributor

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?

Copy link
Member Author

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

@mtymek
Copy link
Contributor

mtymek commented Dec 21, 2015

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`.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/expressive/public

Copy link
Contributor

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.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok 👍

@weierophinney weierophinney merged commit 8f02fe6 into zendframework:master Dec 22, 2015
weierophinney added a commit that referenced this pull request Dec 22, 2015
weierophinney added a commit that referenced this pull request Dec 22, 2015
@weierophinney weierophinney deleted the hotfix/skeleton-51 branch December 22, 2015 14:31
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants