• Resolved mdj101

    (@mdj101)


    If you visit

    https://www.katepriestphotography.com/

    I get a 404 error, but

    https://www.katepriestphotography.com/index.php

    Works fine.

    I’ve got the following in my web.config file

    <?xml version="1.0" encoding="UTF-8"?>
    <configuration>
    <system.webServer>
    <httpRedirect enabled="false" destination="https://www.katepriestphotography.com/index.php" childOnly="false" httpResponseStatus="Permanent" />
    <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/{R:0}" />
            </rule>
        </rules>
    </rewrite>
    </system.webServer>
    </configuration>
Viewing 1 replies (of 1 total)
  • Thread Starter mdj101

    (@mdj101)

    RESOLVED!

    I have worked out why this is happening to people on IIS.

    In IIS the default documents are set to Index. and not index. So when the home page is called it’s looking for Index.php, but it doesn’t exist.

    Of course, all the other directories work as the web.config file specifies index.php

    So to resolve this issue all you have to do in IIS is delete the Index.php entry and add a new one named index.php

    I hope this helps a few people.

Viewing 1 replies (of 1 total)
  • The topic ‘HomePage 404 but /index.php works’ is closed to new replies.