After fresh-installing ubuntu 11.10, I have to reinstall my Apache2, PHP5, MySQL, etc… One of the things I should do is enabling the Rewrite Module for my Apache2 web server.
It was simple, just do these steps:
- Enabling the physical module.
$ sudo ln -s /etc/apache2/mods-available/rewrite.load /etc/apache2/mods-enabled/
-
Allow the Overriding, by editing /etc/apache2/sites-enabled/000-default file using your editor. Change the lines containing: AllowOverride from None to All.
- The last, restart your apache2 server using:
$ sudo service apache2 restart
*Update: Add the following code inside your VirtualHost declaration if your redirection couldn’t run properly
<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
– END – 🙂
* Just to be guide of myself at the future *