me looking so small in this world

21 2006f August, 2006

enabling mod rewrite in xampp

Filed under: htaccess, xampp — rudyegenias @ 5:01 am

I know this is pretty lame but being not lame is not beginner friendly. Being used to htaccess’ power to make my links more user friendly. I find the default installation of xampp a bit of lacking it. Thought it’s only because I do have with me the lite version of it (xampplite). But I have with me a full installed xampp better yet check it. Nothing.

So I did a little poking into configuration file of apache that came bundled with it. This is what I found out. By default mod_rewrite module is not enabled by default so I took the following steps.

To enable mod_rewrite in xampp first go to the directory of installation <xampp-directory>\apache\conf  and edit httpd.conf. Find the line which contains
#LoadModule rewrite_module modules/mod_rewrite.so
uncomment this(should be):

LoadModule rewrite_module modules/mod_rewrite.so

Also find AllowOverride None 

Should be:

AllowOverride All

I really think it appears 2 or 3 times on the configuration file.

Happy xampping!

122 Comments »

  1. thanks very helpful

    Comment by Adam — 13 2006f October, 2006 @ 6:50 am | Reply

  2. Thanks Adam.. I am honored to help others..

    Comment by rudyegenias — 13 2006f October, 2006 @ 11:15 am | Reply

  3. thx a lot!!!

    this thing makes me crazy for a little while

    Comment by ngkong (indonesia) — 13 2006f October, 2006 @ 9:41 pm | Reply

  4. This was driving me nuts! I had allowoverride set, but not the module uncommented. Thanks!

    Comment by Chad — 16 2006f October, 2006 @ 9:15 pm | Reply

  5. thank you.

    Comment by rodrigot — 24 2006f October, 2006 @ 10:31 pm | Reply

  6. Thank you so much. I looked for this everywhere!

    Comment by sirkitree — 16 2007f January, 2007 @ 8:52 am | Reply

  7. Thanks very much guys for appreciating my work. :) Enjoy.

    Comment by Rudy Egenias — 16 2007f January, 2007 @ 9:54 am | Reply

  8. Hmmz, it aint working here. I use this code in mt htaccess file after enabeling the module and set the allowoveride.

    Options -Indexes +FollowSymLinks +ExecCGI
    AddDefaultCharset UTF-8

    RewriteEngine on
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ index.php?page=$1 [L,QSA]

    Comment by Laurens — 22 2007f February, 2007 @ 9:51 pm | Reply

  9. thanks

    Comment by frank — 13 2007f April, 2007 @ 2:21 pm | Reply

  10. @Laurens: Are you sure it’s a default install of xampp? Does restarting the httpd daemon solve that already(I am thinking maybe you have already restarted your dev. machine)?

    Question: You have disabled Indexes. wouldn’t that conflict with the 2nd RewriteCond?Haven’t tried it though.

    @frank: no problem

    Comment by rudyegenias — 15 2007f April, 2007 @ 11:05 am | Reply

  11. Cheers buddy :-)

    Comment by Nick — 2 2007f May, 2007 @ 3:58 am | Reply

  12. Thanks a million for this! Saved me a *lot* of hassle with inherited code :-)

    Comment by Altor — 21 2007f May, 2007 @ 3:37 am | Reply

  13. [...] Enabling Mod Rewrite in XAMPP June 6th 2007 Posted to Uncategorized [...]

    Pingback by WebChicanery » Xampp and Mod_Rewrite — 6 2007f June, 2007 @ 1:00 pm | Reply

  14. apache need to be restarted

    Comment by zrvl — 8 2007f June, 2007 @ 1:12 am | Reply

  15. Thanks! What a life saver… :)

    Comment by suniljolly — 13 2007f June, 2007 @ 7:09 am | Reply

  16. Thanks sunijolly for the visit.. I really appreciate it. :)

    Comment by rudyegenias — 16 2007f June, 2007 @ 9:48 pm | Reply

  17. Hi i am trying to run joomla under the htdocs directory.
    1)- i have modified the httpd.conf accordingly (to allow sef urls running)
    2)- i have created an alias of the directory where i am running my joomla, done this in the “httpd-xampp.conf”
    Nothing is working, still have the 404 error, please help me
    yaz

    Comment by yaz — 24 2007f June, 2007 @ 4:24 am | Reply

  18. Thanks. I uncommented the module, but forgot the overrides. Saved me a ton of time/

    jmc

    Comment by jmc — 26 2007f June, 2007 @ 8:41 am | Reply

  19. Tks a lot.

    Comment by Fernando — 27 2007f June, 2007 @ 4:33 am | Reply

  20. No problem Fernando. Thanks for visiting. :)

    Comment by rudyegenias — 28 2007f June, 2007 @ 5:29 pm | Reply

  21. [...] the dumbo that I am I turned to the ever faithful font of all knowledge. This led me to Rudy’s blog post (thanks Rudy!) on the subject. Flicking around his blog there is a post about using reverse DNS [...]

    Pingback by A Circular Route To Alison Moyet : Cornell Finch — 7 2007f July, 2007 @ 8:30 pm | Reply

  22. [...] hattip: rudy [...]

    Pingback by Xampp Mod Rewrite at Apples of Gold — 16 2007f August, 2007 @ 5:03 am | Reply

  23. thanks a loxt it helped me with my webitse a lo!!!!!…

    you are an angel!;)

    Comment by River Plate - Futbol Club Oficial Website — 12 2007f September, 2007 @ 7:04 am | Reply

  24. Thank you for the post. Helpful.

    Comment by Drew Merkle — 30 2007f September, 2007 @ 10:03 pm | Reply

  25. Thank you very much for visiting Drew and I am glad I have helped you. Cheers.

    Comment by rudyegenias — 2 2007f October, 2007 @ 2:29 am | Reply

  26. Thanks alot, tried half an hour to figure it out before I found your post !

    Comment by Florian — 4 2007f October, 2007 @ 5:15 am | Reply

  27. Thanks for visiting Florian. Cheers! And enjoy using xampp.

    Comment by rudyegenias — 4 2007f October, 2007 @ 11:17 am | Reply

  28. Thanks so much for sharing this information. God bless you.

    Comment by Search Scripts — 6 2007f October, 2007 @ 4:03 pm | Reply

  29. tanks!!! :D

    Comment by Atul — 10 2007f October, 2007 @ 12:33 am | Reply

  30. You Are the best ;) Thankx

    Comment by Helio — 10 2007f October, 2007 @ 11:16 pm | Reply

  31. Very useful thanks

    Comment by Rich — 30 2007f October, 2007 @ 7:55 pm | Reply

  32. Very Thxs to this blog creater

    I have chage my mode_rewrite on from getting help from this site

    Please help me for not getting me proper script for portal

    Thaxs dear

    Comment by Rajan Bali — 10 2007f November, 2007 @ 10:49 am | Reply

  33. Thank you, this helped me out very well.

    Comment by Esta — 14 2007f November, 2007 @ 3:49 am | Reply

  34. Thank you! It is great tutorial.

    Comment by Honza — 26 2007f November, 2007 @ 5:10 pm | Reply

  35. Nice one Rudy, thanks.

    Comment by bon — 28 2007f November, 2007 @ 8:55 am | Reply

  36. Cheers mate!

    Comment by dean — 11 2007f December, 2007 @ 7:10 pm | Reply

  37. Thanks!

    Comment by karpar — 13 2008f January, 2008 @ 2:23 am | Reply

  38. very helpful, thanks.

    Comment by ray — 20 2008f January, 2008 @ 8:51 am | Reply

  39. Thanks Adam for visiting~!

    Comment by rudyegenias — 22 2008f January, 2008 @ 5:14 am | Reply

  40. Thanks for the note.

    Comment by Haran — 17 2008f February, 2008 @ 2:08 am | Reply

  41. thanks very helpful

    Comment by Akhtar — 10 2008f March, 2008 @ 2:11 am | Reply

  42. Hello

    Thats great but does it work with XAMPP on windows?

    Comment by Fahd Murtaza — 31 2008f March, 2008 @ 7:43 pm | Reply

  43. Thanks, I needed just that.

    Comment by Sam — 1 2008f April, 2008 @ 8:20 pm | Reply

  44. Yes, in fact I am running it on windows, there is also a version for LINUX. Cheers.

    Comment by rudyegenias — 2 2008f April, 2008 @ 10:49 am | Reply

  45. awesome, exactly what I was looking for! now I can get on with testing wordpress locally before I put it online, thanks!

    Comment by Andy Bailey — 10 2008f April, 2008 @ 7:31 pm | Reply

  46. Thanx a lot!! It was really helpful :)

    Comment by wizardry — 18 2008f April, 2008 @ 7:12 am | Reply

  47. dont forget to restart apache!!!

    Comment by ari — 22 2008f April, 2008 @ 8:57 am | Reply

  48. Thank you! Spent an hour trying to figure this out…

    Comment by Me — 26 2008f April, 2008 @ 3:00 pm | Reply

  49. Pretty decent post, I have a follow up to this also: http://letstalkdev.com/xampp/mod-rewrite-on-a-windows-xampp-server/ Almost the same but its a step by step process

    Comment by nevuxbb — 3 2008f May, 2008 @ 9:09 am | Reply

  50. :-( There is a problem in doing the above rewriting with XAMPP + Code Igniter + Windows + .htaccess

    I have the following .htaccess file
    #—————–
    RewriteEngine on
    RewriteCond $1 !^(index\.php|images|stylesheets|javascript)
    RewriteRule ^(.*)$ /index.php/$1 [L]
    #—————–

    I have uncommented apache http.conf line

    LoadModule rewrite_module modules/mod_rewrite.so

    And “AllowOverride None” to “AllowOverride All”,
    i have made 2 changes

    i have restarted XAMPP, but failed. .htacess is not working with my XAMPP on codeigniter project.

    Any one welcome to help me.

    amjithps(at)gmail(dot)com

    Experts please come forward.

    Thanks in advance

    Comment by Cool Coder — 10 2008f May, 2008 @ 4:57 am | Reply

  51. This was most helpful, thanks. :)

    Comment by Saber — 20 2008f May, 2008 @ 10:41 am | Reply

  52. Thanks alot, nice, its works for me, thanks again :) :) :) :)

    Comment by Shah Hussain — 20 2008f May, 2008 @ 9:07 pm | Reply

  53. [...] .html or not? Hope for the best… Try this: enabling mod rewrite in xampp me looking so small in this world __________________ Business Directory | Technology Blog | Windows [...]

    Pingback by .html or not? - Page 4 - CodeCall Programming Forum — 28 2008f May, 2008 @ 3:08 am | Reply

  54. Thanks!
    I had some weird problems (”500″ errors when I added re-write rules in .htaccess).
    Had to re-start Xampp 4 times, make and un-make changes to httpd.conf… I believe it may have been a global Search “AllowOverride None” and replace with “AllowOverride all” that fixed it finally. Selective changes may have been the culprit. Could have also been Apache process was not being fully killed, or some sort of caching?
    Anyway, the errors are gone and re-write is working great! Thanks!

    Comment by Jonathan Cross — 4 2008f June, 2008 @ 10:52 pm | Reply

  55. Excellent. One search, one hit..and it solved my problem emidiately. Thanx for your publication.

    Comment by Niels — 14 2008f June, 2008 @ 8:54 pm | Reply

  56. Brilliant! Thank you so much.

    (just it might be useful to add to the article that you need to restart Apache as it appears to be the solution to many of the commented problems)

    :)

    Comment by Martin — 18 2008f June, 2008 @ 3:58 am | Reply

  57. Great trick … Thanks

    Comment by IT Outsourcing — 24 2008f June, 2008 @ 2:59 pm | Reply

  58. hey, thanks so much.. i wasting my life time almost 48 hours to solve this problem lol.. actually not because want to install wordpress, but i want to use “preety URL” and .htacess in my own CMS (that i currently develop)..

    i try all the step in .htacess tutorial, it still not working. until i found this article, about how to enable mod_rewrite..

    i thought mod_rewrite is already enabled by default huh.. :-(

    Comment by epool86 — 24 2008f June, 2008 @ 9:58 pm | Reply

  59. Thanks alot for this info.

    This is definitely NOT a lame article. Very useful :)

    Excellent work :)

    Comment by Ibn Saeed — 25 2008f June, 2008 @ 6:51 pm | Reply

  60. thanxxxxxxx

    Comment by renju — 30 2008f June, 2008 @ 5:54 pm | Reply

  61. Thanks for that info very usefull…

    Comment by pixelxdesign.com — 4 2008f July, 2008 @ 1:13 am | Reply

  62. Thanks for this post

    Comment by manchumahara — 9 2008f July, 2008 @ 11:36 pm | Reply

  63. Now, two years later, it’s still sooo useful! Thank you for posting this two years ago! :)

    Comment by netsnake — 12 2008f July, 2008 @ 6:56 pm | Reply

  64. Thank You. Worked perfectly.

    My Drupal installation is now allowing my local server to serve “clean urls”

    Amazing! Thanks!

    Comment by Josh — 17 2008f July, 2008 @ 3:37 am | Reply

  65. Thanks a lot.
    Solved my problem!

    Comment by ervinter — 18 2008f July, 2008 @ 9:41 pm | Reply

  66. thanks a lot, saved me probably a lot of time, your page is no 1 at google in the keywords “enable mod_rewrite in xampp”

    Thanks,
    Rey

    Comment by rey mendoza — 28 2008f July, 2008 @ 3:25 pm | Reply

  67. Thanks man, really helpful

    Comment by Mike — 7 2008f August, 2008 @ 1:28 am | Reply

  68. Brilliant, thank you.

    Comment by Ben — 12 2008f August, 2008 @ 1:07 am | Reply

  69. Thanks! Very helpful article.

    Comment by Michael — 16 2008f August, 2008 @ 5:41 am | Reply

  70. thank you!

    Comment by apis17 — 16 2008f August, 2008 @ 2:41 pm | Reply

  71. It did help me. Thanks a lot =)

    Comment by zomal — 19 2008f August, 2008 @ 12:52 am | Reply

  72. Not working here !
    I am on xampp, did what I saw here, but it did not work. Apache working fine, excluding me to had an erroreus writing in the httpd.conf. What could the problem be ?

    I remember someone telling about a AddModule mod_rewrite.c line in it, but it makes Apache crash!

    As I cannot see this page all the time, if anyone could help me, please mail to ch_bg@abv.bg

    Comment by George — 22 2008f August, 2008 @ 4:40 pm | Reply

  73. A lot of thanks !!

    Comment by Iuga — 24 2008f August, 2008 @ 3:02 am | Reply

  74. thanks! u solve my problem

    Comment by nana — 1 2008f September, 2008 @ 5:57 pm | Reply

  75. thanks a lot bybeh :D! my problem solved now

    Comment by aksesmedia — 4 2008f September, 2008 @ 7:41 am | Reply

  76. Thanks!! i was almost crazy insulting Zend 5′ ago!

    Comment by Marcos — 11 2008f September, 2008 @ 3:32 am | Reply

  77. Superb! Thank you.

    As always, I’m glad to be of HELP. Cheers.

    Comment by Tim — 1 2008f October, 2008 @ 7:02 pm | Reply

  78. Very helpful. I was trying to set up php cake on my laptop and needed this! Thanks!

    Comment by David — 2 2008f October, 2008 @ 7:59 am | Reply

  79. [...] hattip: rudy [...]

    Pingback by Xampp Mod Rewrite | Christian Affiliate Marketing — 5 2008f October, 2008 @ 2:21 am | Reply

  80. Thanks for the helpAAAAAAAAAAA!!!!!!!!!!!!!

    Comment by pezerovic branislav — 15 2008f October, 2008 @ 6:46 am | Reply

  81. Good evening Rudy;

    Many thanks for your tip about .htaccess files. I have a .php script to force a download dialogue box to appear. All I succeeded in achieving was a server error. This of course suggested a problem with Apache or my .htaccess file. The htacces file is fine, so, I found your tip.

    You have saved me many problems. Thank you

    Best wishes

    Tim

    Comment by Tim Cliffe — 17 2008f October, 2008 @ 4:10 am | Reply

  82. Thank you. The web needs more of these easy-to-find solutions. As mentioned by someone else, this was the first page I looked at and it solved my problem. A+

    Comment by Ian — 17 2008f October, 2008 @ 6:11 am | Reply

  83. Thanks!

    Comment by JV — 18 2008f October, 2008 @ 11:03 pm | Reply

  84. Tim > thanks for the wonderful review. I am honored.

    Ian > cheers mate. comment is so warm.

    JV > thanks for visiting. glad to be of service.

    Comment by rudyegenias — 20 2008f October, 2008 @ 8:58 pm | Reply

  85. Spot on!
    This must get quite a few people. I just about know about mod_rewrite, but I’ve never used Apache directly until now, so I had never heard of httpd.conf before.
    If only those nice people at XAMPP would write some instructions for ‘the rest of us’. I’d be happy to translate their English into English!

    Comment by Ian — 21 2008f October, 2008 @ 12:03 am | Reply

  86. thanx a lot dude, it really helped me!!!!!!!!!

    Comment by Ruby — 23 2008f October, 2008 @ 8:51 pm | Reply

  87. Two years later and that post is still tremendously useful. Thanks for putting that up; I was tearing my hair out over this one.

    Comment by Clint — 24 2008f October, 2008 @ 1:43 am | Reply

  88. I thought I might also mention that this worked for macports’s version of apache2.

    Comment by Clint — 24 2008f October, 2008 @ 1:51 am | Reply

  89. Very useful, thanks for leaving the post up!

    Comment by Brendhan — 25 2008f October, 2008 @ 11:15 am | Reply

  90. This post is still helpful 2 years later, thanks.

    Comment by Mr Feromona — 25 2008f October, 2008 @ 10:05 pm | Reply

  91. Ian, Ruby, Clint, Brendhan, Mr Feromona > Thanks for visiting, glad to be of help. Cheers from the Philippines.

    Comment by rudyegenias — 26 2008f October, 2008 @ 10:34 pm | Reply

  92. Hello, thanks alot:)
    God Bless!!

    Comment by cmula — 28 2008f October, 2008 @ 8:08 pm | Reply

  93. Добавил в закладки. Теперь буду почаще читать!

    Comment by Суханов Олег Николаевич — 1 2008f November, 2008 @ 11:39 pm | Reply

  94. Thank you so much …

    Very helpful :D

    ^:)^

    Comment by flashit — 7 2008f November, 2008 @ 2:09 pm | Reply

  95. I did as you instructed in the page. But when I restarted the apache, I got a syntax error and is below:

    Syntax error on line 186 of C://xampp/apache/conf/http.conf:
    directive requires additional arguments

    apache could not be started..

    Please help me to fix this.

    Comment by Joseph — 7 2008f November, 2008 @ 6:14 pm | Reply

  96. great that you have it working now! cheers

    It works fine this time, when I changed the following:

    On Line 186: I commented the following:

    #
    # Options FollowSymLinks
    # AllowOverride None
    # Order deny,allow
    # Deny from all
    #

    Comment by Joseph — 7 2008f November, 2008 @ 6:33 pm | Reply

  97. Thank you, thank you, thank you!!

    Comment by Chris Burbridge — 14 2008f November, 2008 @ 9:33 am | Reply

  98. Thanks alot :)

    Comment by Ibn Saeed — 21 2008f November, 2008 @ 6:03 pm | Reply

  99. Thanks!

    Comment by Jerry — 21 2008f November, 2008 @ 10:55 pm | Reply

  100. do not work for me with CodeIgniter

    Comment by Lukas — 28 2008f November, 2008 @ 2:14 pm | Reply

  101. Good eyes! Thanksssss!

    Comment by Anouchka — 1 2008f December, 2008 @ 6:43 am | Reply

  102. [...] to .htaccess. As default option mod_rewrite is not loaded, if you need a good guide have a look at this resource. Regards, Zoli __________________ █Time may come when you will need a shopping cart [...]

    Pingback by no links showing in product cart - Webmaster Forums UK SEO SEM Webmaster Community Forum - UKWW — 2 2008f December, 2008 @ 1:48 pm | Reply

  103. This is so awesome!!!! Thanx a lot man!!! It was really helpful…

    Comment by Engel — 2 2008f December, 2008 @ 7:42 pm | Reply

  104. And i do use CodeIgniter, the main reason I have this post.

    Lukas, It should work man… Im using codeigniter too…

    Comment by Engel — 2 2008f December, 2008 @ 7:43 pm | Reply

  105. thanks!

    Comment by Fahad — 3 2008f December, 2008 @ 2:24 am | Reply

  106. Yet another thanks!

    Comment by Matt — 23 2009f January, 2009 @ 11:01 pm | Reply

  107. following the instructions carefully will do the trick.

    i get error 500

    i un commented the load of it and set allow all to override.

    Comment by bizzy — 24 2009f January, 2009 @ 8:57 pm | Reply

  108. read the instructions by heart and you’ll be set. :P

    Side note: codeigniter is not the same as xampp.

    I still get the 500 internal server error after following your instructions.

    I’m on the verge of switching to CodeIgniter!!!

    Please help

    Comment by Qafui — 25 2009f January, 2009 @ 10:50 pm | Reply

  109. Thank you!

    Comment by grasshopa — 31 2009f January, 2009 @ 9:48 am | Reply

  110. Its was very helpful Thanks!!!

    Comment by Hema — 4 2009f March, 2009 @ 5:52 pm | Reply

  111. thnx ..

    Comment by anjhero — 4 2009f March, 2009 @ 11:31 pm | Reply

  112. thanks lot, very useful

    http://roshanbh.com.np/2008/04/check-enable-mod_rewrite-apache.html

    this site help to check weather rewrite mode is loaded or not.

    thanks
    Nayana Adassuriya

    Comment by Nayana Adassuriya — 27 2009f March, 2009 @ 6:10 pm | Reply

  113. Хорошая статья, узнал много нового!)

    Comment by горшок — 31 2009f March, 2009 @ 5:37 pm | Reply

  114. tnx a lot.. really helped…

    Comment by saleh — 8 2009f April, 2009 @ 5:13 pm | Reply

  115. Thanks…it still works
    :)

    Comment by Akhil Yadav — 15 2009f April, 2009 @ 8:06 pm | Reply

  116. Thanks buddy

    Comment by karkotagan — 17 2009f April, 2009 @ 1:32 pm | Reply

  117. Thanks a ton!

    Comment by Grant — 28 2009f May, 2009 @ 1:01 am | Reply

  118. thank you very much .. really helping ..

    Comment by mossawir — 29 2009f May, 2009 @ 8:57 pm | Reply

  119. Thanks a lot :)

    Comment by Faraz Butt — 19 2009f June, 2009 @ 2:57 pm | Reply

  120. Thanks … It’s so help me … Finally I can solved it

    Comment by rendra — 10 2009f July, 2009 @ 12:29 pm | Reply


RSS feed for comments on this post. TrackBack URI

Leave a comment

Blog at WordPress.com.