To check that mod_rewrite and PHP are enabled, look at /etc/apache2/httpd.conf and ensure that these lines:
LoadModule rewrite_module libexec/apache2/mod_rewrite.so
LoadModule php5_module libexec/apache2/libphp5.so
are uncommented.
Also ensure that AllowOverride
is set to All
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.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…