How can I enable the use of .htaccess files in an Ubuntu 14.04 server with LAMP installed?

Posted April 28, 2014 20.8k views
I have an Ubuntu 14.04 server set up with Apache, PHP and MySQL, how can I allow the use of .htaccess and allow rewrite rules?

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
2 answers
Siento no responderte en ingles pero no soy muy bueno con los idiomas.

Para permitir el uso de los .htaccess debes acceder al archivo "/etc/apache2/apache2.conf" y buscar la linea "", dentro de esa directiva cambiar "AllowOverride None" a "AllowOverride All" y despues reiniciar apache con "sudo service apache2 restart".

Y para activar el modulo rewrite de apache debes ejecutar el comando "a2enmod rewrite" y volver a reiniciar apache con "sudo service apache2 restart".
With a search in google I found this, hope it helps.