XAMPP mod_rewrite , clean Url .htaccess

Today every sites requirement is to have a user friendly URLs which can be archived by .htaccess and apache. Since I’m running PHP I used XAMPP . A default Xampp installation is lacking the mod_rewrite functionality. So to make the mod_rewrite module working, we need to do some tweak in Apache’s httpd.conf file.

Since by default mod_rewrite module is not enabled by default so I did the following steps.

To enable mod_rewrite in xampp first go to the directory of installation \apache\conf and edit httpd.conf. Find the line which contains
#LoadModule rewrite_module modules/mod_rewrite.so
uncomment this(just remove #, should be):

LoadModule rewrite_module modules/mod_rewrite.so

Also find AllowOverride None

Should be:

AllowOverride All

I really think it appears 2 or 3 times on the configuration file.

This setting is also required to get the clean_url module to function in drupal.

now restart the server and you are done.

Happy xampping!

5 Comments on “XAMPP mod_rewrite , clean Url .htaccess”

  1. Keith Davis says:

    I use XAMPP on a windows vista machine as a local setup to develop WordPress sites.
    One wordpress feature is an automatic upgrade from within the WordPress dashboard.

    I can’t get this to work in the local setup, and a few people have suggested that it may be the XAMPP settings.

    I found this article, which discusses changing XAMPP default settings and thought that you may be able to help.

    I am using the XAMPP default settings (I have never modified them) do you have any idea what XAMPP settings may be blocking the automatic upgrade?

    • Mak says:

      Please try to change php.ini file which you will find them here C:\xampp\apache\bin\php.ini
      you have to change the following lines
      post_max_size = 8M
      upload_max_filesize = 2M
      max_execution_time = 30
      max_input_time = 60
      memory_limit = 8M


      post_max_size = 750M
      upload_max_filesize = 750M
      max_execution_time = 5000
      max_input_time = 5000
      memory_limit = 1000M

      try and let me know if this works.

  2. Keith Davis says:

    Thanks Mak

    I’ll give it a try and let you know.

  3. Dimitar says:

    Hi Mak,
    I’ve change the settings in the apache conf file (I’ve uncomend the line and change the “AllowOverride none” to “AllowOverride all” in all the places I found it) but still receiving the error.
    I’ve test this on two machines with different xampp versions and none of them worked.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


Get every new post delivered to your Inbox.

Join 415 other followers