Enable htacces localhost – How to Enable htaccess in xampp (localhost)?
Just go the Terminal and follow the following steps
I enabled mod re-write by typing below command and restart the apache server.
sudo a2enmod rewrite
Now restart your apache2 by typing below command.
sudo /etc/init.d/apache2 restart
How to enable .htaccess in windows
Using a text editor, open the httpd.conf file. In XAMPP, this file is found in the apacheconf directory
Locate the following line of code:
#LoadModule rewrite_module modules/mod_rewrite.so
Remove the # from the line as seen below to enable the module:
LoadModule rewrite_module modules/mod_rewrite.so
Save the httpd.conf file and Restart your server
Restart your Apache Server