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!
thanks very helpful
Comment by Adam — 13 2006f October, 2006 @ 6:50 am |
Thanks Adam.. I am honored to help others..
Comment by rudyegenias — 13 2006f October, 2006 @ 11:15 am |
thx a lot!!!
this thing makes me crazy for a little while
Comment by ngkong (indonesia) — 13 2006f October, 2006 @ 9:41 pm |
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 |
thank you.
Comment by rodrigot — 24 2006f October, 2006 @ 10:31 pm |
Thank you so much. I looked for this everywhere!
Comment by sirkitree — 16 2007f January, 2007 @ 8:52 am |
Thanks very much guys for appreciating my work. :) Enjoy.
Comment by Rudy Egenias — 16 2007f January, 2007 @ 9:54 am |
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 |
thanks
Comment by frank — 13 2007f April, 2007 @ 2:21 pm |
@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 |
Cheers buddy :-)
Comment by Nick — 2 2007f May, 2007 @ 3:58 am |
Thanks a million for this! Saved me a *lot* of hassle with inherited code :-)
Comment by Altor — 21 2007f May, 2007 @ 3:37 am |
[...] 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 |
apache need to be restarted
Comment by zrvl — 8 2007f June, 2007 @ 1:12 am |
Thanks! What a life saver… :)
Comment by suniljolly — 13 2007f June, 2007 @ 7:09 am |
Thanks sunijolly for the visit.. I really appreciate it. :)
Comment by rudyegenias — 16 2007f June, 2007 @ 9:48 pm |
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 |
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 |
Tks a lot.
Comment by Fernando — 27 2007f June, 2007 @ 4:33 am |
No problem Fernando. Thanks for visiting. :)
Comment by rudyegenias — 28 2007f June, 2007 @ 5:29 pm |
[...] 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 |
[...] hattip: rudy [...]
Pingback by Xampp Mod Rewrite at Apples of Gold — 16 2007f August, 2007 @ 5:03 am |
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 |
Thank you for the post. Helpful.
Comment by Drew Merkle — 30 2007f September, 2007 @ 10:03 pm |
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 |
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 |
Thanks for visiting Florian. Cheers! And enjoy using xampp.
Comment by rudyegenias — 4 2007f October, 2007 @ 11:17 am |
Thanks so much for sharing this information. God bless you.
Comment by Search Scripts — 6 2007f October, 2007 @ 4:03 pm |
tanks!!! :D
Comment by Atul — 10 2007f October, 2007 @ 12:33 am |
You Are the best ;) Thankx
Comment by Helio — 10 2007f October, 2007 @ 11:16 pm |
Very useful thanks
Comment by Rich — 30 2007f October, 2007 @ 7:55 pm |
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 |
Thank you, this helped me out very well.
Comment by Esta — 14 2007f November, 2007 @ 3:49 am |
Thank you! It is great tutorial.
Comment by Honza — 26 2007f November, 2007 @ 5:10 pm |
Nice one Rudy, thanks.
Comment by bon — 28 2007f November, 2007 @ 8:55 am |
Cheers mate!
Comment by dean — 11 2007f December, 2007 @ 7:10 pm |
Thanks!
Comment by karpar — 13 2008f January, 2008 @ 2:23 am |
very helpful, thanks.
Comment by ray — 20 2008f January, 2008 @ 8:51 am |
Thanks Adam for visiting~!
Comment by rudyegenias — 22 2008f January, 2008 @ 5:14 am |
Thanks for the note.
Comment by Haran — 17 2008f February, 2008 @ 2:08 am |
thanks very helpful
Comment by Akhtar — 10 2008f March, 2008 @ 2:11 am |
Hello
Thats great but does it work with XAMPP on windows?
Comment by Fahd Murtaza — 31 2008f March, 2008 @ 7:43 pm |
Thanks, I needed just that.
Comment by Sam — 1 2008f April, 2008 @ 8:20 pm |
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 |
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 |
Thanx a lot!! It was really helpful :)
Comment by wizardry — 18 2008f April, 2008 @ 7:12 am |
dont forget to restart apache!!!
Comment by ari — 22 2008f April, 2008 @ 8:57 am |
Thank you! Spent an hour trying to figure this out…
Comment by Me — 26 2008f April, 2008 @ 3:00 pm |
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 |
:-( 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 |
[...] http://rudyegenias.wordpress.com/2006/08/21/enabling-mod-rewrite-in-xampp/ [...]
Pingback by Zend Framework Handleiding » Installatie xampp lite — 14 2008f May, 2008 @ 4:45 am |
This was most helpful, thanks. :)
Comment by Saber — 20 2008f May, 2008 @ 10:41 am |
Thanks alot, nice, its works for me, thanks again :) :) :) :)
Comment by Shah Hussain — 20 2008f May, 2008 @ 9:07 pm |
[...] .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 |
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 |
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 |
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 |
Great trick … Thanks
Comment by IT Outsourcing — 24 2008f June, 2008 @ 2:59 pm |
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 |
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 |
thanxxxxxxx
Comment by renju — 30 2008f June, 2008 @ 5:54 pm |
Thanks for that info very usefull…
Comment by pixelxdesign.com — 4 2008f July, 2008 @ 1:13 am |
Thanks for this post
Comment by manchumahara — 9 2008f July, 2008 @ 11:36 pm |
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 |
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 |
Thanks a lot.
Solved my problem!
Comment by ervinter — 18 2008f July, 2008 @ 9:41 pm |
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 |
Thanks man, really helpful
Comment by Mike — 7 2008f August, 2008 @ 1:28 am |
Brilliant, thank you.
Comment by Ben — 12 2008f August, 2008 @ 1:07 am |
Thanks! Very helpful article.
Comment by Michael — 16 2008f August, 2008 @ 5:41 am |
thank you!
Comment by apis17 — 16 2008f August, 2008 @ 2:41 pm |
It did help me. Thanks a lot =)
Comment by zomal — 19 2008f August, 2008 @ 12:52 am |
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 |
A lot of thanks !!
Comment by Iuga — 24 2008f August, 2008 @ 3:02 am |
thanks! u solve my problem
Comment by nana — 1 2008f September, 2008 @ 5:57 pm |
thanks a lot bybeh :D! my problem solved now
Comment by aksesmedia — 4 2008f September, 2008 @ 7:41 am |
Thanks!! i was almost crazy insulting Zend 5′ ago!
Comment by Marcos — 11 2008f September, 2008 @ 3:32 am |
As always, I’m glad to be of HELP. Cheers.
Comment by Tim — 1 2008f October, 2008 @ 7:02 pm |
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 |
[...] hattip: rudy [...]
Pingback by Xampp Mod Rewrite | Christian Affiliate Marketing — 5 2008f October, 2008 @ 2:21 am |
Thanks for the helpAAAAAAAAAAA!!!!!!!!!!!!!
Comment by pezerovic branislav — 15 2008f October, 2008 @ 6:46 am |
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 |
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 |
Thanks!
Comment by JV — 18 2008f October, 2008 @ 11:03 pm |
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 |
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 |
thanx a lot dude, it really helped me!!!!!!!!!
Comment by Ruby — 23 2008f October, 2008 @ 8:51 pm |
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 |
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 |
Very useful, thanks for leaving the post up!
Comment by Brendhan — 25 2008f October, 2008 @ 11:15 am |
This post is still helpful 2 years later, thanks.
Comment by Mr Feromona — 25 2008f October, 2008 @ 10:05 pm |
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 |
Hello, thanks alot:)
God Bless!!
Comment by cmula — 28 2008f October, 2008 @ 8:08 pm |
Добавил в закладки. Теперь буду почаще читать!
Comment by Суханов Олег Николаевич — 1 2008f November, 2008 @ 11:39 pm |
Thank you so much …
Very helpful :D
^:)^
Comment by flashit — 7 2008f November, 2008 @ 2:09 pm |
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 |
great that you have it working now! cheers
Comment by Joseph — 7 2008f November, 2008 @ 6:33 pm |
Thank you, thank you, thank you!!
Comment by Chris Burbridge — 14 2008f November, 2008 @ 9:33 am |
Thanks alot :)
Comment by Ibn Saeed — 21 2008f November, 2008 @ 6:03 pm |
Thanks!
Comment by Jerry — 21 2008f November, 2008 @ 10:55 pm |
do not work for me with CodeIgniter
Comment by Lukas — 28 2008f November, 2008 @ 2:14 pm |
Good eyes! Thanksssss!
Comment by Anouchka — 1 2008f December, 2008 @ 6:43 am |
[...] 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 |
This is so awesome!!!! Thanx a lot man!!! It was really helpful…
Comment by Engel — 2 2008f December, 2008 @ 7:42 pm |
And i do use CodeIgniter, the main reason I have this post.
Comment by Engel — 2 2008f December, 2008 @ 7:43 pm |
thanks!
Comment by Fahad — 3 2008f December, 2008 @ 2:24 am |
Yet another thanks!
Comment by Matt — 23 2009f January, 2009 @ 11:01 pm |
following the instructions carefully will do the trick.
Comment by bizzy — 24 2009f January, 2009 @ 8:57 pm |
read the instructions by heart and you’ll be set. :P
Side note: codeigniter is not the same as xampp.
Comment by Qafui — 25 2009f January, 2009 @ 10:50 pm |
Thank you!
Comment by grasshopa — 31 2009f January, 2009 @ 9:48 am |
Its was very helpful Thanks!!!
Comment by Hema — 4 2009f March, 2009 @ 5:52 pm |
thnx ..
Comment by anjhero — 4 2009f March, 2009 @ 11:31 pm |
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 |
Хорошая статья, узнал много нового!)
Comment by горшок — 31 2009f March, 2009 @ 5:37 pm |
tnx a lot.. really helped…
Comment by saleh — 8 2009f April, 2009 @ 5:13 pm |
Thanks…it still works
:)
Comment by Akhil Yadav — 15 2009f April, 2009 @ 8:06 pm |
[...] http://rudyegenias.wordpress.com/2006/08/21/enabling-mod-rewrite-in-xampp/ [...]
Pingback by Enabling clean url in windows xp with xampp « Zomal’s Weblog — 15 2009f April, 2009 @ 8:52 pm |
Thanks buddy
Comment by karkotagan — 17 2009f April, 2009 @ 1:32 pm |
Thanks a ton!
Comment by Grant — 28 2009f May, 2009 @ 1:01 am |
thank you very much .. really helping ..
Comment by mossawir — 29 2009f May, 2009 @ 8:57 pm |
Thanks a lot :)
Comment by Faraz Butt — 19 2009f June, 2009 @ 2:57 pm |
Thanks … It’s so help me … Finally I can solved it
Comment by rendra — 10 2009f July, 2009 @ 12:29 pm |