IIS 6 / FastCGI PHP RewriteRule problem

Topics: Developer Forum, User Forum
Apr 11, 2013 at 4:19 PM
I have a PHP site running on Windows Server 2003 R2 (x64) under IIS 6 / FastCGI. The site is a dev instance of a production site running on Linux / Apache.

On the production site, I have a directory that utilizes the following mod_rewrite syntax in a .htaccess file:

RewriteCond %{REQUEST_FILENAME} !-s
RewriteCond %{REQUEST_FILENAME} !-l
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .*$ index.php [NC,L]

The rule works as expected on the production site, directing all requests to the index.php script in that directory. However, I cannot get it to work on the dev (IIS) site.

I have placed the following syntax in a IIRF.ini file in the same directory as the .htaccess file it replaces:

RewriteCond %{REQUEST_FILENAME} !-s
RewriteCond %{REQUEST_FILENAME} !-l
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .*$ index.php [L,I]

Whenever I attempt to access a URL that references the directory in question, I just get a 404 error (Page cannot be displayed).

The ISAPI Rewrite Filter appears to be installed correctly, as far as I can tell, but it doesn't look like the IIRF.ini file above is even being invoked.

Assuming the syntax I am using is valid, might I be missing some other configuration step?