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

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?

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

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.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

Siento no responderte en ingles pero no soy muy bueno con los idiomas. <br> <br>Para permitir el uso de los .htaccess debes acceder al archivo “/etc/apache2/apache2.conf” y buscar la linea “<Directory /var/www/>”, dentro de esa directiva cambiar “AllowOverride None” a “AllowOverride All” y despues reiniciar apache con “sudo service apache2 restart”. <br> <br>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. <br>