Monday, 7 May 2012

How To Enable mod_rewrite In LAMP- Ubuntu Linux

  • give permissions to the /var/www/ directory
           sudo chown -R $USER:$USER /var/www/
  •  Install the Apache module mod_rewrite
           a2enmod rewrite
  • Chnage the directory and keep the back up of the file “000-default”
          cd /etc/apache2/sites-enabled/
         sudo cp  000-default 000-default1
  • Edit the file 000-default
          sudo vi 000-default
          Look for the below given code
          Options Indexes FollowSymLinks MultiViews
          AllowOverride none
          Order allow,deny
          allow from all
          Modify “AllowOverride none” to “AllowOverride All”
  • Restart Apache
         sudo /etc/init.d/apache2 restart

No comments:

Post a Comment