I have an .htaccess file which works when I try it on my local xampp setup.
Here's the file:
RewriteEngine on
RewriteRule ^([0-9a-zA-Z]+)$ $1.php [NC,L]
RewriteRule ^videos/([0-9a-zA-Z-]+)$ videos.php?var=$1 [NC,L]
RewriteRule ^video/([0-9a-zA-Z-]+)$ video.php?var=$1 [NC,L]
But whenever I upload it to my Ubuntu 14.04 VPS running LAMP, the htaccess does not work, as if it is not even there.
I have Require all granted
in my 000-default.conf, I tried a2enmod rewrite
and then restarted apache, but still, no development.
BTW, AccessFileName .htaccess
is uncommented in /etc/apache2/apache2.conf
Here'es my directory configuration in 000-default.conf
ServerAdmin webmaster@localhost
DocumentRoot /vagrant/www/site/
<Directory /vagrant/www/site/>
Options +FollowSymLinks +MultiViews
AllowOverride All
Require all granted
</Directory>