I getting started with zend framework 2 and they have a prerequisite of an installation and configuration of mod_rewrite for apache. Apache 2.2.22 came pre-installed on Mac OS X 10.8.2. Is there an easy way to install and configure mod_rewrite for apache?
The only help I have come across suggests to recompile apache. Is this the only way?
I know this is an old thread, but this also might raise this issue:
Make sure
DocumentRoot
andDirectory
links to the same folder in/etc/apache2/extra/httpd-vhosts.conf
as following:This is an innocent mistake if you copy the virtual host block from existing sites.
Cheers!
To check that mod_rewrite and PHP are enabled, look at /etc/apache2/httpd.conf and ensure that these lines:
are uncommented.
Also ensure that
AllowOverride
is set toAll
within the<Directory "/Library/WebServer/Documents">
section.After making these changes, restart Apache with:
sudo apachectl restart
If you then put your project within the
/Library/WebServer/Documents
folder, then it should work.