Dec 23
How to enable Apache mod rewrite in Ubuntu
Actually this probably works for all Linux distributions with Apache 2. Okay enabling mod_rewrite is really easy, you just have to use a2enmod (Apache 2 enable module):
sudo a2enmod rewrite
sudo /etc/init.d/apache2 restart
sudo /etc/init.d/apache2 restart
To disable an Apache 2 module, you can run:
sudo a2dismod rewrite
sudo /etc/init.d/apache2 restart
sudo /etc/init.d/apache2 restart
That does the reverse.
With mod_rewrite enabled, you can use the .htaccess file.
By the way in your directory permissions, you must set AllowOverride to “all” like this:
<Directory /home/kahwee/projects/whatever>
Options Indexes FollowSymLinks MultiViews
AllowOverride all
Order allow,deny
allow from all
</Directory>
Options Indexes FollowSymLinks MultiViews
AllowOverride all
Order allow,deny
allow from all
</Directory>
Hope it helps.
Possibly related: