Jump to content

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.