Gossamer Forum
Home : General : Perl Programming :

mod rewrite

Quote Reply
mod rewrite
I'm running Apache on Windows 2000 and I can't get mod_rewrite to work. I know that I have it (it's in the modules directory).

In .htaccess, I have:
Code:
RewriteEngine on
RewriteRule ^/test/(.*)$ foo/$1 [R]

in httpd.conf, I uncommented:
Code:
LoadModule rewrite_module modules/mod_rewrite.so

When I restart apache and try to access
Code:
http://localhost/test/

The url isn't getting changed and all I get is a 404 because "test" doesn't exists.

Is there something I'm missing? Can somebody post an example of a properly set up httpd.conf and .htaccess file?

--Philip
Links 2.0 moderator
Quote Reply
Re: [King Junko II] mod rewrite In reply to
Hi,

I think ther is a line some where in the httpd.conf which somehow like the one u mention but the extension is .c not .so. Try to add this line and check again man.

Cheers,

Dat

Programming and creating plugins and templates
Blog
Quote Reply
Re: [tandat] mod rewrite In reply to
no luck there. in fact, I have no file named "mod_rewrite.c" in my installation. I did find a copy in Apache 2.0, but I'm not sure what to do with it, and there is no GOOD documentation on Apache that I've found yet, not even at apache.org, on how to get rewrite working from start to finish without all the technical jargon.

--Philip
Links 2.0 moderator
Quote Reply
Re: [King Junko II] mod rewrite In reply to
Did you uncomment the following line:

#AddModule mod_rewrite.c



Cheers - Dan Cool

----
Cheers,

Dan
Founder and CEO

LionsGate Creative
GoodPassRobot
Magelln
Quote Reply
Re: [dan] mod rewrite In reply to
there is no line in my conf file with that in there... Adiitionally, running apache -l shows it's not compiled in.

--Philip
Links 2.0 moderator
Quote Reply
Re: [King Junko II] mod rewrite In reply to
Hm... I finally managed to get rewrite to work.

--Philip
Links 2.0 moderator
Quote Reply
Re: [King Junko II] mod rewrite In reply to
On windows you should have:

LoadModule rewrite_module modules/mod_rewrite.so

....but I don't think you need AddModule mod_rewrite.c

How did you get it to work?
Quote Reply
Re: [RedRum] mod rewrite In reply to
by putting my rewritecond and reewriterule statements in httpd.conf instead of .htaccess.

--Philip
Links 2.0 moderator