/var/www
. I have many subdirectories within it, and I’d like to have one of these subdirectories using clean URLs, specifically becaused I was testing some RESTful API stuff. However, I’ve struggled a bit to make Apache recognize my .htaccess file.So, after some minor stress, here it is the quick step-by-step guide of what I did, without further explanations:
sudo vim /etc/apache2/sites-available/defaultWithin the
Directory /var/www
directive, change AllowOverride None
by AllowOverride All
. Then run these two commands:sudo a2enmod rewrite sudo service apache2 restartAnd all of sudden it started working.