Home > Apache, PHP > How to enable rewrite module in XAMPP, WAMP and Apache

How to enable rewrite module in XAMPP, WAMP and Apache

March 4th, 2009

If you are using XAMPP or WAMP as your web server, you may face a common problem that is the rewrite module (mod_rewrite) does not work properly. It is because the rewrite module is not enabled by default in Apache’s configuration settings. But you can enable it manually by doing few simple steps:

  1. Open apache’s configuration file using your favorite text editor. The configuration file generally locates at:{apache_dir}/conf/httpd.conf
    If you are using XAMPP or WAMP package then you will find the file at:{xampp_dir}/apache/conf/httpd.conf
    {wamp_dir}/apache/conf/httpd.conf
  2. Search for the following string:#LoadModule rewrite_module modules/mod_rewrite.so and uncomment it (remove the ‘#’ sign).
  3. Now search for another string AllowOverride None and replace it by AllowOverride All
  4. Finally save the changes, close your text editor and restart your apache server.

That’s all. :)

Share and Enjoy:
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • BlogMemes
  • email
  • LinkedIn
  • Live
  • Print
  • Taggly
  • TwitThis
  • Yahoo! Buzz

$@!ful Apache, PHP , , , , , , ,

  1. October 26th, 2011 at 00:40 | #1

    Worked great here, thanks for tip!

  2. asha
    November 26th, 2011 at 13:12 | #2

    Thank you very much i am so much frustrated about this issue you give me my life and this is now working

  3. Atif
    December 19th, 2011 at 13:55 | #3

    Thanks

  4. Gokul Kadam
    December 20th, 2011 at 09:22 | #4

    Thank you so much!
    but i have 1 query that:
    this problem face in localhost we solve it by some changes in localhost file ok fine.
    but this problem can be face in webserver?, when our application is run in market.

  5. March 13th, 2012 at 20:03 | #5

    Thanks a lot!
    You made my day, I tried for about 8 hours to make it work.

  6. adwin
    March 23rd, 2012 at 09:03 | #6

    Hi, I am facing a problem.
    I have done all the setting like you mentioned
    but I can only access to the index page.
    All the pages other than index are shown “Page not found”
    I am using wamp server.
    Do you know what the error is ?

  7. Harberg
    March 28th, 2012 at 02:21 | #7

    Just wanted to say thank you for this. I have spent way to long getting this nonsense figured out.

    Thank you.

  8. Owusu
    May 2nd, 2012 at 20:37 | #8

    It does not work for me..
    This is what I have in my htaccess.

    Options +FollowSymlinks
    RewriteEngine on

    RewriteRule ^news/([^/\.]+)/?$ news.php?news_title=$1 [NC]
    RewriteRule ^profiles/([^/\.]+)/?$ profiles.php?name=$1 [NC]
    RewriteRule ^lyrics/([^/\.]+)/?$ lyrics.php?name=$1 [NC]

    Please help me as I am getting frustrated..

    Thanks you all.

  9. saejuro
    May 22nd, 2012 at 19:45 | #9

    Thanks a lot you made my day! :)

  10. vermanisha
    October 6th, 2012 at 19:43 | #10

    Very helpful. I solved my problem with the help of this.

Comment pages
  1. No trackbacks yet.