0

I'm trying to move a zend application from Apache2 to IIS6, so I decided to install ISAPI Rewrite 3 as recommended here, so I copied the hole app folder to c:\inetpub\wwwroot\ and made the IIS Default Web Site to point to the folder /public.

Now, my .htaccess in /public is the following, as suggested here.

RewriteRule (?!\.(js|ico|gif|jpg|png|css|swf))$ index.php

But nothing happens, I can reach the homepage OK, and static files too, but no rewriting is done to my URLs, so none of my controllers would work.. Any idea? Thanks!

Joaquín L. Robles
  • 6,261
  • 10
  • 66
  • 96

1 Answers1

0

If you are using ISAPI_Rewrite 3 then you will need to use Apache version of rules since it is compatible with Apache, i.e.

RewriteEngine on
RewriteBase /
RewriteRule !\.(js|ico|txt|gif|jpg|png|css)$ index.php

or better

RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php
Yaroslav
  • 1,241
  • 10
  • 13
  • Thanks Yaroslav, but the problem was because I was using the Lite version of Isapi Rewrite, which has to be configured with a single conf file placed in it's installation directory – Joaquín L. Robles Aug 19 '11 at 13:12