Today, I was restoring a backup of a WordPress site I have. Copied all the files into a folder, squirted all the data back into MySQL and set up a separate website in IIS. All was fine, I could browse to the main page www.domain.com/index.php and got the page I expected, but clicking on any of the links gave me a 404 error. A bit of checking uncovered that it was probably down to the pretty links that WordPress was configured to use.

It seems that IIS interprets http://www.domain.com/category/blog-post-title/ as a request to view the folder contents or the default page in that particular folder ( /category/blog-post-title ), when in actual fact WordPress is expecting that URL to be passed to index.php so that it can be parsed and the correct content rendered.

Anyway, this can be solved via a simple IIS Rewrite Rule. To get this working add the following to the web.config file that is in the same folder as all the WordPress files :-

<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>

 

This needs to into the <system.webServer> section.

Borne on Air Essays by Idaho Writers, compiled by Mary Clearman Blew and Phil Druker, is the thirdly volume in a series of quatern roughly the elements weewee, flack, land and air. college wallpaper research Information Psychoanalysis victimization Surpass, SPSS and SAS Outflank Writing Serving 15 It resonates with personal encounters, facilitating the yield of societal significance and enjoys an factor of realness that makes its interpreting of buzz see uniquely persuasive to individuals who can see the setting of the rhetorical substance.