Jump to content

How to enable mod_rewrite in Apache 2.0.54 ?


Fahid

Recommended Posts

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

 

restarted my Apache, but it is still not working.

some body tell me how to do it,

how to enable mod_rewrite ?

Link to comment
Share on other sites

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

Link to comment
Share on other sites

  • 4 weeks later...

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

Link to comment
Share on other sites

  • 1 month later...
  • 3 months later...

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!

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.