Home
<insert witty slogan>

Getting clean URLs working under Windows running Apache2

Just a quick note on getting clean URLs working under windows:

  • Open your httpd.conf file
  • run a find for mod_rewrite, and you will end up with something like:
    #LoadModule rewrite_module modules/mod_rewrite.so
            

    Remove the # from the above statement.

  • Run a search for "<Directory". You will come across the default directory config for Apache, followed by an example config.
  • Add the following below both of the above directory config blocks:
    <Directory "D:/programs/apache2/Apache2/htdocs/drupal">
    Options FollowSymLinks
    AllowOverride All
    RewriteEngine On
    </Directory>
          

    Supplant "D:/programs/apache2/Apache2/htdocs/drupal" with the path to your Drupal installation.

  • Save file and restart Apache

That should get Clean URLs working :)

-K

Comments

This was the easiest how-to I found on how to to this, Thanks

Is there a way to do this without access to the apache server httpd.config file?

It depends on how your host is configured. On some setups, they allow you to store a separate httpd.conf file that is loaded by the root file.. I suggest you contact your host. Impressing on them the necessity of such provisions in running CMS-es like Drupal generally forces them to be a little pliable.

Best of luck :)
-K

I can't get this to work for me. I get the error message "Multiple arguments not (yet) supported." How doI make this work?

Not sure, never heard of that error. Please check with your host or #apache on freenode.

Best of luck :)
-K

After 2 bad hours, I found your instructions, and finally I get Clean URL :-)

Thanks!!!

Thank You - This is the only solution that worked for me.

It works great in Windows. But don't forget you still need the included .htaccess file in your Drupal directory or it won't work.

...finally found a solution that works. ;)

thxs

Thanks for this solution Karthik, works excellent.

Thanks

It works. Thanks a lot.

Thanx from Holland this was the solution I was looking for.

It's great, Karthik!

Thanks.

For standard installations, no.

you've made my day. it works. wish the drupal site could make it this simple, thanks so much!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

finally !!
That was at least clear and it works !!

thank you very much

Thank you for posting this. After about 2 hours searching on Google, I can now proceed.

I've been trying to get this to work for a while now and your instructions were clear and worked perfectly. Thanks!

Thanks Karthik
Great information, easy to follow and works a treat.
If anyone is running several drupal code bases from a single Apache installation (I am running 4.7, 5.x and 6.x) then you can just add a separate entry for each code base folder.

Yah its very easy, its working, Thanks!!!

I have one doubt that we have added the directory root( E:\xampp\htdocs\elan), if i want to work on multiple projects what i have to do

WOw ..
it works like a charm !!
thank you very much...

You posted it in 2005. We are now in 2012. I have try a lot of stuff to make it work (clean url),a nd I finally found this. All work fine ! Great !