I used a small tutorial to create a menu through the Navigation_Menu view helper. I created my Zend folder inside a subfolder of localhost so now I can access this in my brwoser with
localhost/project/public
Now the menu gets a relative url from my config. For instance ‘about’ maps to /index/about. Now my view helper maps ‘about’ to localhost/index/about. How can I map this to localhost/project/public/index/about without altering my config file?
Most probably, this is not Zend specific, so correct me if I’m wrong.
Assuming you are using Xampp/Apache lokal Webserver, here’s the HowTo on setting up a local Domain
$xamppRoot / apache / conf / extraFolderhttp-vhosts.confNow comes the variable part and i will just post my Structure. You may edit
Servername(which basically is the url/domain),DocumentRoot(which is the path to project/public),SetEnv APPLICATION_ENV $yourenv(Zend Config Environment) and<Directory ...>(which once again is the path to project/public)With this your Apache now knows how to Set up a local domain. The only thing left to do now is to make your local machine not access the internet when accessing
http://hod.devHOSTS(you may use a simple text editor)127.0.0.1 hod.devPS: I’m sorry that the code-block above does look shitty, but somehow it doesn’t work really well in here – breaks the code somehow 🙁