You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In mezzio/mezzio#69, the author requested a built-in feature for mezzio to allow the application be stored in a sub-directory.
This brings several issues, as the router and all tooling around it uses the incoming request path to match routes. So either, the routes are provided with the sub-directory in-place or something will interact with the request and removes the pre-configured base path (subdirectory) from the incoming request.
I've scribbled down my idea to do this during runtime in case someone does not have access to the webserver configuration and thus cannot add any rewrite rules to it.
WARNING: It is highly recommended to use the webservers configuration to ensure proper document roots and to block access to vendor/, config/, data/, e.g. directories!
I think this middleware could be part of this package and thus adding the feature request here.
When we have this middleware in-place, @froschdesign brought up the idea to integrate a new installation step to the mezzio-skeleton. To make this an easy installation step, we might provide a laminas-cli command in here (or in the mezzio-tooling component, but I prefer to have it in the same component as the middleware itself), so it can be easily activated/deactivated. Thanks for that amazing idea, Frank!
The text was updated successfully, but these errors were encountered:
There's one other aspect to this: it affects URL generation (e.g., via the UrlHelper)! We would also need "base path" integration in the UrlHelper to ensure that the base path is prepended to any generated URLs.
Feature Request
Summary
In mezzio/mezzio#69, the author requested a built-in feature for mezzio to allow the application be stored in a sub-directory.
This brings several issues, as the router and all tooling around it uses the incoming request path to match routes. So either, the routes are provided with the sub-directory in-place or something will interact with the request and removes the pre-configured base path (subdirectory) from the incoming request.
I've scribbled down my idea to do this during runtime in case someone does not have access to the webserver configuration and thus cannot add any rewrite rules to it.
WARNING: It is highly recommended to use the webservers configuration to ensure proper document roots and to block access to
vendor/
,config/
,data/
, e.g. directories!I think this middleware could be part of this package and thus adding the feature request here.
When we have this middleware in-place, @froschdesign brought up the idea to integrate a new installation step to the
mezzio-skeleton
. To make this an easy installation step, we might provide alaminas-cli
command in here (or in themezzio-tooling
component, but I prefer to have it in the same component as the middleware itself), so it can be easily activated/deactivated. Thanks for that amazing idea, Frank!The text was updated successfully, but these errors were encountered: