Forum Moderators: phranque
I'm trying to activate mod rewrite on apache 2.2 running on windows xp as a windows service.
I uncommented the "LoadModule rewrite_module modules/mod_rewrite.so" line on the configuration file. I can't find the "AddModule mod_rewrite.c" and if I add it to the file, the server fails to start.
I tryed to override the accessfile name to remove the dot from the name (.htaccess -> htaccess) thrue "AccessFileName htaccess".
I configured the Directory options with:
<Directory />
Options Indexes MultiViews
AllowOverride All
Order allow,deny
Allow from all
</Directory>
even with qualified path just to be shure:
<Directory "C:/Programas/Apache Software Foundation/Apache2.2/htdocs">
Options Indexes MultiViews
AllowOverride All
Order allow,deny
Allow from all
</Directory>
My test is simple, but it just won't work. Yhis is my
.htaccess:
rewriteEngine on
rewriteRule ^/test\.html$ /works.html
I have the works.html on the root folder. When I hit the test.html on the browser I get the error:
[Sat May 10 16:01:28 2008] [error] [client 127.0.0.1] File does not exist: C:/Programas/Apache Software Foundation/Apache2.2/htdocs/test.html
Does anyone have a hint for me? I'm running out of options..
thanks in advance
If not, don't enable it, as it can interfere with mod_rewrite.
Two errors:
1) In order to use mod_rewrite, you must enable the FollowSymLinks or SymLinksIfOwnerMatch option, as specified in the mod_rewrite documentation. I'd suggest changing your Options directive to:
Options Indexes FollowSymLinks
RewriteRule [b]^t[/b]est\.html$ /works.html [L]