The Cone Trees network The UX Bookmark UX Quotes UX Jobs in Singapore Nice one yeah!

Drupal: How to enable Clean URL’s if using localhost

If you can’t enable clean URL’s in Drupal when set up locally, chances are that mod rewrite is disabled. All you have to do is uncomment a line in your httpd.conf file in order to enable mod rewrite disabled. If you’re using XAMPP, it’s located at xampp\apache\conf.

Open the file in notepad or a text editor of your choice and search for the following line:
#LoadModule rewrite_module modules/

Uncomment it by getting rid of the #.

Restart Apache and you should be able to enable clean URL’s now. In case you can’t, drop a a comment and I’ll be glad to help out.

  • I did the changes as mentioned above, but unable to restart the Apache as its showing the message

  • Cone Trees

    Glany, do a Ctrl-Alt-Del and kill the xampp-control.exe process. Then restart the Xampp control panel.

    Does this help?

  • Thanks!!
    I have got clean urls now 😀
    Thank you very much!

  • Cone Trees

    You’re welcome Izan.

  • Tony Z

    Thanks! I had tried a couple of other solutions, but this is the one that finally worked.

  • Cone Trees

    Great. You’re welcome Tony.

  • good share….thanks

  • Cone Trees

    Your welcome risang.

  • Hello Dear,
    Clean URL is activated now, thanks a lot.

    I am running it in local system and since there is no outgoing emails, it shows some alerts in pink background. How to resolve those, also its says Cron has not run.


  • Cone Trees

    Hi Jais

    I know what you are talking about but I haven’t used Drupal for a really long time now. I’ll try and find out and let you know if you’re still interested.

  • @Jaison
    u receive a mail from local installation procedure because you have not a mail-server. About the CRON: you can run it manually when you need it. It’s usefull in several cases (if u set triggers for examples, or detecting updates). It is possible also to run the CRON automatically through command line (complex stuff). Hope I was helpfull guys! Bye

  • Mayilsamy

    I’m using WAMP server. I locally installed drupal 6 , the clean url is not working here. I did followed your instructions. Can you help me out?..Thanx in advance.

  • Orkhan

    It really worked for me.

  • Mani

    Thank you

  • Jon

    I have Drupal 6 and lamp install with Ubuntu 11.04. I copied my website down to localhost but have problems. All links return 404 Not found. If I include ?q= in the url the browser just strips it out. The site is at /var/www/
    My httpd.conf (at /etc/apache2/httpd.conf) was empty, so I added
    LoadModule rewrite_module modules/

    Running apache2ctl -M returns rewrite_module (shared)
    so I assume that it is running.

    any help much appreciated

  • Brijesh

    Same position as Mayilsamy. Drupal 6 on Wampserver. Followed your instructions. Can’t enable Clean URLs on Drupal site as admin.

  • Thanks for the support for clean urls in localhost

  • Thanks it working

  • Telmo

    Muito muito obrigado!

  • Sanjay Grover

    Sir where i can access Apache Server in parallel plesk 9.5.5 .i m not able to access conf. file