You are here

Getting clean URLs working under Windows running Apache2

Submitted by Karthik on 11 May, 2005 - 12:13

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

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!!!

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

It works. Thanks a lot.

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

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

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 !