Wednesday, June 29, 2011

Enable htaccess on ubuntu

Found the solution!! Apache2 in general, or it might be specifically to Ubuntu, is configured slightly differently than Apache1.x.. at least from what I've seen in the default installs in RH, FC, Mandrake, etc (I'm not Linux or Apache expert).

I went to /etc/apache2/sites-available and edited the file default
There you'll find:

Code:
NameVirtualHost *

ServerAdmin admin@site.com

DocumentRoot /var/www/

Options FollowSymLinks
AllowOverride None


Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
# This directive allows us to have apache2's default start page
# in /apache2-default/, but still have / go to the right place
# Commented out for Ubuntu
#RedirectMatch ^/$ /apache2-default/
Default for AllowOverride is none, should be all
/etc/init.d/apache2 restart to restart apache and your .htaccess files should now work!! How frustrating, but educational

Credit to Ubuntu forum

No comments:

Post a Comment