THIS MODULE IS NOT NEEDED ANYMORE, JUST USE A CURRENT ZF2 RELEASE!
DluBaseUrl is a Zend Framework 2 module used to set the baseUrl in case the application is deployed in a vhost subdirectory and the baseUrl autodetection does not guess the base URL right.
When you need this module?
If you deployed your application into a virtual host subdirectory, i.e. you are accessing the index page something like this:
and you are getting an error in response:
The requested controller could not be mapped to an existing controller class.
then you need this module (provided there is no other error in configuration, routing, etc.).
There is an issue for this bug in the bugtracker:
You can use this module to cleanly circumvent the shortcomming until the bug in ZF2 is removed.
- Zend Framework 2.0.0beta3
- Go to your project's directory.
- Clone this project into your
./vendor/directory as a
git clone https://bitbucket.org/dlu/dlubaseurl.git ./vendor/DluBaseUrl
- Enable this module in your
dluBaseUrl.local.config.php.distconfig file to your application's
- Rename the config file to
- Edit the config file and enter the correct base URL according to your local deployment as the
baseUrlparameter. E.g. if you are accessing your application like this
baseUrl => '/myapp'