views:

19

answers:

1

I have just bought a new Windows server with IIS on it and plesk panel. Good times (I thought...)

I have about 10 client sites that run on PHP which shouldn't be a problem. But I can't seem to get an answer from my hosting provider on how to get my .htaccess working on the windows server so I'm getting stung for two lots of hosting and don't know the best way forward.

How do i get my .htaccess rewriting working on windows?

EDIT I have installed the IIS version 2 of their rewrite module and tried to convert my .htaccess file into a web.config set of rules.

Now my very basic site which uses the zend framework shows a 404 for the homepage (90% of the time) and the other pages to display the site but they all show the homepage.

Any ideas or has anyone had similar problems?

Will post the rules I'm using shortly and the old .htaccess file that used to work.

.htaccess file from linux setup

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

Windows version

<rewrite>
  <rules>
    <rule name="Imported Rule 1" stopProcessing="true">
      <match url="^.*$" />
      <conditions logicalGrouping="MatchAny">
        <add input="{REQUEST_FILENAME}" matchType="IsFile"  />
        <add input="{REQUEST_FILENAME}" matchType="IsDirectory"  />
      </conditions>
      <action type="None" />
    </rule>
    <rule name="Imported Rule 2" stopProcessing="true">
      <match url="^.*$" />
      <action type="Rewrite" url="index.php" />
    </rule>
  </rules>
</rewrite>
+1  A: 

.htaccess files are specific to the Apache web server. They're not going to do a thing on IIS.

You'll need to convert them to a format IIS understands. Here's a tutorial.

ceejayoz
tried this now but no luck - see updated questions +1
Andi
any more ideas??
Andi