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
https://forums.phpfreaks.com/topic/3104-how-to-enable-mod_rewrite-in-apache-2054/
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

  • 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!

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.