How to enable mod_rewrite in XAMPP
mod_rewrite is an Apache web server module which is used to rewrite a URL at the server level. This module has a variety of uses. But it is most frequently used to provide clean, search engine friendly URLs.
For example, if the original link is something like http://linuxandfriends.com/?q=wp ; Thanks to mod_rewrite, that link can be accessed by the end user and search engines as http://linuxandfriends.com/2008/12/wordpress/ which is a lot more friendlier.
Enabling mod_rewrite in XAMPP
XAMPP stands for Apache, MySQL, PHP and Perl. This is a software bundle which allows developers to easily install the above mentioned four software on their machine and test their websites. Apache Friends – the creators of XAMPP have released it for Windows, Linux and Mac OSX.
XAMPP comes with mod_rewrite module disabled by default. The following are the steps required to enable mod_rewrite module so that your websites such as WordPress blog, Drupal or Joomla sites can display search engine friendly URLs.
- Assuming you have unpacked the xampp folder in the
C:\directory, navigate to the folder containing the apache configuration files. The full path isC:\xampp\apache\conf\. - In the
conffolder, you will find a file namedhttpd.conf. This file holds all the configuration parameters for apache. Open the file in a text editor. - Search for
mod_rewrite.soand you will come across a line as follows :#LoadModule rewrite_module modules/mod_rewrite.so - Uncomment the line by removing the hash (
#) mark. - Save the file and restart Apache web server.
Now you will find that your site (WordPress, Drupal,Joomla) is able to use search engine friendly URLs.

