Install and configure mod_rewrite for Apache 2 on Mac OS X for Zend Framework 2

前端 未结 8 965
不思量自难忘°
不思量自难忘° 2020-12-13 09:16

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

8条回答
  •  忘掉有多难
    2020-12-13 09:52

    If you are serving your site from ~/Sites, the trick for me was modifying my /private/etc/apache2/users/USERNAME.conf file. Initially, the content was:

    
        Options Indexes MultiViews FollowSymLinks ExecCGI
        AllowOverride None
        Order allow,deny
        Allow from all
    
    

    Changing AllowOverride to all and then restarting the server with a quick sudo apachectl restart enabled me to start using mod_rewrite in .htaccess files living beneath ~/Sites.

提交回复
热议问题