Getting clean URLs working under Windows running Apache2

By Karthik , 11 May 2005

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

Anonymous (not verified)

19 years 6 months ago

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

Daniel (not verified)

19 years 5 months ago

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

Karthik

19 years 5 months ago

In reply to by Daniel (not verified)

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

Best of luck :)
-K

skv (not verified)

19 years 4 months ago

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

Thanks!!!

Arnold (not verified)

19 years 4 months ago

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.

Juan Ramón (not verified)

19 years 4 months ago

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

thxs

Pasqualle (not verified)

19 years 3 months ago

Thanks

Luke (not verified)

19 years 3 months ago

It works. Thanks a lot.

Anonymous (not verified)

18 years 7 months ago

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

thank you very much

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.

Prabhu Nivethan (not verified)

16 years ago

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

Pierre (not verified)

13 years 12 months ago

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 !