By default XAMPP and similar Apache Web Servers that can be run from Windows do not have mod_rewrite enabled. This causes Apache to ignore an .htaccess file. In the following simple solution, I show you how to enable mod_rewrite to enable the use of .htaccess on Apache servers in Windows like XAMPP. Moreover, this allows you to create nice permalinks for software like WordPress.
How to enable or use .htaccess on Apache Web Servers in Windows:
- Using a text editor, open the httpd.conf file. In XAMPP, this file is found in the \apache\conf 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