Recently I was trying to get .htaccess control working under Windows and XAMPP. I found it surprisingly hard to find the answer, even though it's a simple one. You've got to make two changes to the httpd.conf file, which for me was found in C:/xampp/apache/conf.

  1. Search the httpd.conf file for 'mod_rewrite'. You'll find the statement that loads that module is commented out. Remove the '#' at the start of the line to un-comment it.
  2. By default, XAMPP on Windows does not allow .htaccess files to override the httpd.conf file. Search the httpd.conf file for 'AllowOverride'. You should find one or more statements that say 'AllowOverride None'. Wherever you find it (or more selectively, if you're savvy like that), change it to 'AllowOverride All'.

Don't forget to restart Apache, and you're done!