Saturday, June 25, 2011

How to enable Clean URLs with Apache 2 on Ubuntu?

STEP1: From the Linux command line, enable the rewrite module for apache with this command:
sudo a2enmod rewrite

STEP2: use an editor (such as vim or gedit) to edit the appropriate Apache configuration file:
sudo vim /etc/apache2/sites-available/default

STEP3: Look for the following lines and change "AllowOverride None" to "AllowOverride All"
<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
<Directory> 

STEP4: Finally restart Apache 2
sudo /etc/init.d/apache2 restart

Thats all folks! i hope you've enjoyed.

No comments: