Jump to content

Can't rewrite on Windows


Lc3

Recommended Posts

Hi, I'm trying to develop on a Windows XP PC and I'm using Apache 2.2, I can't seem to get .htaccess working. It works fine on my Linux production server.

 

In my httpd.conf, I have the line

LoadModule rewrite_module modules/mod_rewrite.so

uncommented. AccessFileName is set:

AccessFileName .htaccess

just above:

<Directory />
    Options Indexes FollowSymLinks
    AllowOverride All
    Order deny,allow
    Allow from all
</Directory>
<Directory "C:/Program Files/Apache Software Foundation/Apache2.2/htdocs">
    Options Indexes FollowSymLinks
    AllowOverride All
    Order deny,allow
    Allow from all
</Directory>

Filter for ht files is set

<FilesMatch "^\.ht">
    Order allow,deny
    Deny from all
    Satisfy All
</FilesMatch>

And I'm trying a very simple .htaccess file placed in my document root:

Options +FollowSymlinks
RewriteEngine on
RewriteRule ^test$ /test.php [NC,L]
ErrorDocument 404 /errors/404.php

^ This is similar to the sort of htaccess file I have on my production server which works, but here it seems to completely ignore my htaccess file. 404's go to the default 404 message and the rewrite test to redirect test to test.php doesn't work.

 

Any help? ???

 

Thanks.

 

P.S. I remembered to restart apache, that's not the problem. (Though I've forgotten that kind of thing before)

Link to comment
https://forums.phpfreaks.com/topic/132109-cant-rewrite-on-windows/
Share on other sites

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.