Apache : Enable mod_rewrite on MacOSX
February 2nd, 2010 Posted in Mac OSX
Reference http://www.deheus.net/petrik/blog/2005/02/11/getting-mod_rewrite-to-work-on-mac-os-x/
First go to /private/etc/apache2/httpd.conf
Remove # from
1 | LoadModule rewrite_module libexec/httpd/mod_rewrite.so |
Second go to /private/etc/apache2/user/your-username.conf
Change AllowOverride None to AllowOverride all
Third restart the apache2
1 | sudo /usr/sbin/apachectl restart |
If you need to see the log of mod_rewrite in case that something bad happen just go back to /private/etc/apache2/user/you-username.conf
Add these lines
1 2 | RewriteLog "/private/var/log/httpd/rewrite_log" RewriteLogLevel 9 |