• I’ve recently switched from linux to windows hosting on IIS7. I have permalinks working fine, but for some reason when I try to view the site index (index.php) I get an internal wordpress 404. I can only assume this has something to do with the migration but am baffled as to the cause. My web.config contains this:

    <?xml version="1.0" encoding="UTF-8"?>
    <configuration>
        <system.webServer>
            <httpErrors errorMode="Detailed" />
            <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>
        </system.webServer>
    </configuration>

    The site in question is https://www.lime49.com/ . I’ve already tried setting the home page to be s static page in the Reading settings, but is there anything else in WordPress which could cause this?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter HJennerway

    (@hjennerway)

    I’ve even tried hacking 404.php to make this work to no avail. I’m convinced it’s not a rewriting/IIS issue as lime49.com/index.php works and I’ve added a rewrite rule to lowercase all URLs, but the 404 is still on Index.php

    In Settings-Permalinks select Custom Structure and enter /%postname%/. In your web.config, use this as your rewrite section:

    <rewrite>
        <rules>
            <rule name="wordpress">
    			<match url="^/(.*)$" />
    				<conditions>
    					<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
    					<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
    				</conditions>
    			<action type="Rewrite" url="index.php" />
    		</rule>
            <rule name="wordpress2">
    			<match url="(?!index\.php|wp-|xmlrpc)(.*)" />
    				<conditions>
    					<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
    					<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
    				</conditions>
    			<action type="Rewrite" url="index.php/{R:0}" />
    		</rule>
        </rules>
    </rewrite>
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Internal 404 for home page’ is closed to new replies.