Skip to Content

How to enable Mod Rewrite module in XAMPP

By default mod_rewrite module is not enabled for Apache in XAMPP. Please follow the instructions in tutorial below to enable mod_rewrite in XAMPP.

If you running XAMPP on Windows and unable to figure out how to enable mod_rewrite in apache then here is the solution and it is very simple. I assume that you have installed XAMPP in root directory. There is a file httpd.conf in the "xamppapacheconf" folder. I recommend you to take backup of this file as we are going to make some changes in it.


Open up httpd.conf in any text editor like notepad and look for the line below.

#LoadModule rewrite_module modules/

The symbol "#" means it is a comment. Remove the "#" symbol to uncomment it so that it reads,

LoadModule rewrite_module modules/

Next, search for "AllowOverride None" and change it to "AllowOverride All". It is correct once and wrong twice in the file.

Once you have made these changes, save httpd.conf file and restart Apache for mod_rewrite to take effect.

Powered by PHPKB Knowledge Base Software