Jump to content


How to enable mod_rewrite in Apache 2.0.54 ?

  • Please log in to reply
4 replies to this topic

#1 Fahid

  • Members
  • PipPipPip
  • Advanced Member
  • 30 posts
  • LocationPakistan

Posted 27 December 2005 - 01:12 AM

A pre-written PHP Application require me to enable mod_rewrite to be enabled in my Apache web server.

I have Apache 2.0.54 installed on my PC.
I checked the module directory in my Apache instalation directory, and I found a filemod_rewrite.so, and I thought I gave mod_rewrite in my Apache, just have to enable it.
I opened httpd.conf and removed the # from the front of following line.

[!--quoteo--][div class=\'quotetop\']QUOTE[/div][div class=\'quotemain\'][!--quotec--]LoadModule rewrite_module modules/mod_rewrite.so[/quote]

restarted my Apache, but it is still not working.
some body tell me how to do it,
how to enable mod_rewrite ?
Back Again...

#2 Kia

  • Members
  • Pip
  • Newbie
  • 4 posts

Posted 31 December 2005 - 04:58 PM

somewhere in your apache conf file you need to add the line

AddModule mod_rewite.c

however I'm not sure exactly WHERE it is supposed to go.

I'm going to keep looking but I'll check back here and see if anyone has posted a pointer in the mean time

#3 Kia

  • Members
  • Pip
  • Newbie
  • 4 posts

Posted 25 January 2006 - 06:37 PM

This has been a while now.
I am still looking for an answer with this issue.

I have added the line

AddModule mod_rewrite.c

on the line below

LoadModule rewrite_module modules/mod_rewrite.so

but everytime I uncomment it and try to restart Apache it fails as soon as I comment it out Apache will restart with out problems.

I have check via phpinfo.php and the rewrite module is not showing up.

I have direct access to my server (no uploading/ftp or anything) and I have direct access to the conf file.

thanks in advance kia

#4 jklanka

  • New Members
  • Pip
  • Newbie
  • 2 posts

Posted 13 March 2006 - 10:06 AM

I am also having the same problem in Apache 2.0.54 version.
If I place "AddModule mod_rewite.c" then Apache not starting.

Please help on this


#5 VnVision

  • New Members
  • Pip
  • Newbie
  • 2 posts

Posted 13 June 2006 - 11:54 AM

I did experience the same problem when adding the AddModule mod_rewite.c line into httpd.conf (NOT removing the comment - because the original httpd.conf does not have this line). And apache won't start. But as they say mod_rewrite is already included in the conf file of apache, all you have to do is to uncomment sth, so I dont think the line AddModule mod_rewite.c is necessary. So the problem with mod_write not working (when you've uncommented LoadModule rewrite_module modules/mod_rewrite.so) lies somewhere else: if you've changed the path of document root (i.e. the one you arrive at by entering [a href=\"http://localhost\" target=\"_blank\"]http://localhost[/a] ), you should have changed the line DocumentRoot "C:/Program Files/xampp/htdocs", for example, to another path, and it should works fine. But for mod_rewrite to work properly (and maybe for other things as well), however, you must change another line, that is , e.g. <Directory "C:/Program Files/xampp/htdocs">, to reflect the new path to the document root. Change that and you should be done with mod_rewrite!

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users