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/mod_rewrite.so

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.

  • http://localhost GLANY

    I did the changes as mentioned above, but unable to restart the Apache as its showing the message
    Busy…
    error:-1

  • Cone Trees

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

    Does this help?

  • http://darkcloud.homeip.net Izan

    Thanks!!
    I have got clean urls now :D
    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.

  • http://www.3dsmaxworks.com risang

    good share….thanks

  • Cone Trees

    Your welcome risang.

  • http://www.bluemazes.in Jaison

    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.

    Thanks
    Jais

  • 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.

  • http://www.mondofuoco.com Patrizio

    @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

    Hi,
    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.
    Thanks!

  • Mani

    Thank you

  • http://www.presstoprint.co.uk Jon

    Hi
    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/presstoprint.co.uk.
    My httpd.conf (at /etc/apache2/httpd.conf) was empty, so I added
    LoadModule rewrite_module modules/mod_rewrite.so

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

    any help much appreciated
    Jon

  • Brijesh

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

  • http://n/a vijay

    Thanks for the support for clean urls in localhost

  • http://hificomputers.in senthil

    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