Forum Moderators: phranque

Message Too Old, No Replies

Configuring mod_rewrite in Apache2 (win-xp)

I cant get mod_rewrite work on Apache2 (win-xp)

         

asantos

11:33 pm on Mar 12, 2006 (gmt 0)

10+ Year Member



How can i enable the mod_rewrite for Apache2 in win-xp?
so far a followed this steps:

1. i opened httpd.conf
2. searched for "#LoadModule rewrite_module modules/mod_rewrite.so" and removed the "#"
3. searched for "AccessFileName .htaccess" and replaced it with "AccessFileName htaccess.txt" because windows can't handle files that begin with a dot.
5. generated some basic htaccess.txt file and inserted it on the root webfolder.
4. restarted apache2.

it resolved a 404 err... it's just not working. any ideas?

asantos

11:42 pm on Mar 12, 2006 (gmt 0)

10+ Year Member



I already followed the steps from Jim in [webmasterworld.com...]

LoadModule rewrite_module modules/mod_rewrite.so
AllowOverride All
Options All

But it doesn't do the trick.

asantos

2:28 am on Mar 13, 2006 (gmt 0)

10+ Year Member



I re-followed the steps, and it worked alright. Case closed. ;)

BillyS

2:48 am on Mar 13, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Glad it worked, saved me some thought on how to help you. Even better, you learn more when you figure it out yourself.

asantos

9:51 am on Mar 13, 2006 (gmt 0)

10+ Year Member



I still have a problem going.

I have this:
*****************
RewriteEngine on
RewriteCond %{REQUEST_FILENAME}!-f
RewriteCond %{REQUEST_FILENAME}!-d
RewriteRule ^(.*)/_([A-Za-z]{2})$ /index.php?l=$2 [L]
*****************

So that www.mysite.com/some/section/_es
redirects to index.php?l=es
and,
So that www.mysite.com/some/section/_en
redirects to index.php?l=en

all that loads the language file (spanish or english). on my linux installation (at work), it runs fine. but on my windows installation (at home), the $2 variable is not pased to the index.php

does it has to do something with the httpd.conf?