.htaccess needs to be enabled with AllowOverride =========================================================================================== This is the first thing that should be verified. If the AllowOverride directive is set to None then this will disable all .htaccess files. In order to verify this, you must open the Apache configuration file (typically either called httpd.conf or apache.conf) and check that the AllowOverride directive is set to AllowOverride All. If you needed to make changes to your Apache config, remember to save the file and restart Apache. --------------------------------------- AllowOverride All --------------------------------------- Put it in directive.' .htaccess is per directory context, so you have to explicitly tell apache where .htaccess is allowed to be used. --------------------------------------- DocumentRoot /var/www/html ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined Options Includes AllowOverride All --------------------------------------- # Enable mod-rewrite module sudo a2enmod rewrite # Restart apache2 sudo service apache2 restart