Report this

What is the reason for this report?

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

Posted on April 28, 2014

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?



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!

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.

With a search in google I found this, hope it helps. <br>https://help.ubuntu.com/community/EnablingUseOfApacheHtaccessFiles

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”.

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.