Forum Moderators: phranque

Message Too Old, No Replies

Enabling Mod_rewrite Module Problem (windows)

         

oKatt

10:20 am on Jul 4, 2004 (gmt 0)

10+ Year Member



Hi,
I'm experimenting with mod_rewrite and got into some trouble when doing this with a live account. I therefore decided to install Apache locally on my computer but can't get mod_rewrite to work. I want to run it in the .htaccess files of each directory. I've tried both 1.3.31 and 2.0.5something - windows xp :) and have modified the httpd conf file by activating the commented rows:

LoadModule rewrite_module modules/mod_rewrite.so
AddModule mod_rewrite.c (1.3.31)

and added a row (without any tags arround it: Rewrite Engine On: I've also tried to do this in the / directory tag. But I can't get it to work when trying a rewrite rule a 404 error is generated. Have I forgotten to do something in the configuration phase?

/oKatt

oKatt

11:46 am on Jul 4, 2004 (gmt 0)

10+ Year Member



Should also mention that the test configuration gives no error message.

/oKatt

jdMorgan

1:04 pm on Jul 4, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



oKatt,

Welcome to WebmasterWorld [webmasterworld.com]!

Make sure you have the FollowSymLinks or SymLinksIfOwnerMatch option and AllowOverrides FileInfo enabled for any <directory> you want to use mod_rewrite in. Also, you can enable detailed mod_rewrite logging to help you troubleshoot.

Since you didn't post your rewrite rule, we can't tell what it means that you got a 404...

Jim

oKatt

3:25 pm on Jul 4, 2004 (gmt 0)

10+ Year Member



Thank you for your response! Here is how the directory tag looks which i suppose is the default for all directories on the web server:

<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>

Should I modify allowoverride here to:
AllowOverride FileInfo? and then add rewritelog info including level after that?

Do I need to specify rewriteengine on in the httpd.conf file as well?

I'm still having trouble and have tested with this rule:

RewriteBase /
RewriteRule ^page.html test1.html [L]

/oKatt