views:

38

answers:

1

Hi,

Have just installed WordPress 3.0.1 running on MS IIS 6 Windows Server that I developed from my Mac OS X platform.

Pls note that my WordPress setup is under the following directory sructure:

c:\inetpub\wwwroot\MYSITE

The problem here is though, with the site up and running, it can't seem to find any of my pages like "About Us" even though I have set them up correctly within the permalinks side of things.

Am getting "HTTP Error 404 - File or directory not found. Internet Information Services (IIS)"

Is it something to do with permalinks/.htaccess file not working on MS II6?

Really unsure how to fix.

Thanks.

A: 

.htaccess files are for Apache HTTPD. They don't work with IIS. For IIS you need to create a "Web.config" file and add the following lines to it.

<rewrite>
    <rules>
        <rule name="Main Rule" stopProcessing="true">
            <match url=".*" />
            <conditions logicalGrouping="MatchAll">
                <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
                <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
            </conditions>
            <action type="Rewrite" url="index.php" />
        </rule>
    </rules>
</rewrite>

DOESN'T WORK IN IIS6:

As Kev points out, this code doesn't work in IIS6. From a little googling I understand that URL rewriting is not at all possible with IIS6. If anyone knows another way, please update here.

POSSIBLE ALTERNATIVE FOR IIS6?

Is it possible to use ISAPI_Rewrite or UrlRewriter.NET in this situation? Can someone clarify on this?

Nithesh Chandra
Hi Nithesh. really appreciate the info/feedback. Have a few more queries please as I am not familiar with the IIS 6 side of things on Windows Server 2003. 1) Would this definitely be the reason why my WordPress pages are not being found? 2) Do I need to remove all instances of .htaccess files? 3) Where in the scheme of my WordPress directory, do I add the Web.Congif file? Would really appreciate your help further pls to get this site up and running. Thanks.
tonsils
I don't have much experience with IIS either, but I'm sure .htaccess have no meaning to IIS, but you don't NEED to remove them all. As for the location, try putting it in the root folder of your wordpress installation. Just see if it works. You should try Microsoft Web Platform http://www.microsoft.com/web/wordpress/
Nithesh Chandra
No problems Nithesh - will try it out. Thanks again.
tonsils
These rules won't work on IIS6. You need IIS7+ for URL rewriting.
Kev