Using .htaccess in XAMPP on Windows

I googled quiet some time on using custom links for your site on windows using XAMPP. All of them suggested me to uncomment line for ‘mod_rewrite’, set AllowOverride to All. I tried this but it still faced same issue, a 404 error page.

Then I came to one more solution that I tried an bingooo!, it worked like charm. Just to keep note and save some time of other developers , I am putting all steps here . First 2, 3 steps are commonly suggested.

  • Open your apache conf file “httpd.conf” in any editor of your choice.
  • Search “mod_rewrite.so”, you may encounter line as follows –
    #LoadModule rewrite_module modules/mod_rewrite.so
  • Remove the comment “#”.
  • Find “AccessFileName” , you may see a line like –
    “AccessFileName ht.acl” change it to “AccessFileName htaccess.txt”.
  • Create “htaccess.txt” in sites root directory.
  • Restart apache

Thats it, you are done!

5 Comments
  1. August 20, 2014 | Reply
  2. June 25, 2010 | Reply
    • August 20, 2014 | Reply
  3. Niklas
    May 25, 2009 | Reply
    • Pavan
      July 7, 2009 | Reply

Add a Comment

Your email address will not be published. Required fields are marked *