Sunday, March 23, 2008

Enable .htaccess in Leopard

By default, in Leopard Apache, you can't use the .htaccess files.

The solution is to edit your .conf file and modify 2 lines:

-> Open Terminal App
-> Write "sudo pico /private/etc/apache2/httpd.conf"
-> Press ctrl + w
-> Type "AllowOverride" and press enter
-> Replace "AllowOverride none" for "AllowOverride All"
-> Press againg ctrl + w and then enter
-> Replace again "AllowOverride none" for "AllowOverride All"
-> Press ctrl + x
-> Type 'y'
-> Press enter
-> Type "apachectl graceful" and press enter
And it's done, you can close the Terminal and start using .htaccess files