I want start to work with Zend Framework 2.0 . I use os x lion and mamp pro. So to start I used this http://framework.zend.com/manual/2.0/en/user-guide/skeleton-appl
If you have default MAMP installation you can go to phpinfo from MAMP start page by clicking phpinfo tab on top. In phpinfo page you can find if mod_rewrite have been loaded. Just click Cmd + f (on Mac) and type mod_rewrite. It should be in "Loaded Modules" section.
Now you should setup your VirtualHost. Open /Applications/MAMP/conf/apache/httpd.conf
and add this to end of this file:
ServerName zf2-tutorial.localhost
DocumentRoot /absolute/path/to/your/projects/zf2-tutorial/public
SetEnv APPLICATION_ENV "development"
DirectoryIndex index.php
AllowOverride All
Order allow,deny
Allow from all
Now add this line
127.0.0.1 zf2-tutorial.localhost localhost
to your /private/etc/hosts
file.
Restart MAMP.
After going to http://zf2-tutorial.localhost:8888/ you should see "Welcome to Zend Framework 2" start page. After going to http://zf2-tutorial.localhost:8888/1234 you should see 404 ZF2 page the content of this page should be something like that:
If you see something like that everything is perfectly normal. It means that your mod_rewrite is working and you have been redirected to 404 ZF2 page insted of default apache "Not Found" page like that