Link to home
Start Free TrialLog in
Avatar of chrislindsay
chrislindsayFlag for United Kingdom of Great Britain and Northern Ireland

asked on

PHP 7.1 Website not working in IIS 10

Hi Experts,
I have a PHP 7.1 website which I have recently migrated from a IIS 7.5 to a IIS10 website.
The web.config file when migrated didn't work until i removed one of the sections, the rewrite section below :

  <rewrite>
            <rules>
                <rule name="Rewrite to index.php">
                    <match url="index.php|robots.txt|images|test.php" />
                    <action type="None" />
                </rule>
                <rule name="Rewrite CI Index">
                    <match url=".*" />
                    <conditions>
                        <add input="{REQUEST_FILENAME}" pattern="css|js|jpg|jpeg|png|gif|ico|htm|html|mp4|swf|xml" negate="true" />
                    </conditions>
                    <action type="Rewrite" url="index.php/{R:0}" />
                </rule>
            </rules>
        </rewrite>

When accessing the website the web page error message is as below

HTTP Error 404.0 - Not Found
The resource you are looking for has been removed, had its name changed, or is temporarily unavailable.
Most likely causes:
•The directory or file specified does not exist on the Web server.
•The URL contains a typographical error.
•A custom filter or module, such as URLScan, restricts access to the file.

Things you can try:
•Crete the content on the Web server.
•Review the browser URL.
•Create a tracing rule to track failed requests for this HTTP status code and see which module is calling SetStatus. For more information about creating a tracing rule for failed requests, click here.
Detailed Error Information:
Module
   IIS Web Core
Notification
   MapRequestHandler
Handler
   StaticFile
Error Code
   0x80070002
Requested URL
   http://localhost:82/auth/login

Physical Path
   C:\inetpub\!Test\CB\auth\login

Logon Method
Anonymous

Logon User
Anonymous
More Information:
This error means that the file or directory does not exist on the server. Create the file or directory and try the request again.

Any hints would be appreciated

Thank you
Avatar of Dave Baldwin
Dave Baldwin
Flag of United States of America image

Your source for http://localhost:82/auth/login is not under 'wwwroot' which I think it should be for the code above to find it.  C:\inetpub\!Test\CB\auth\login
ASKER CERTIFIED SOLUTION
Avatar of chrislindsay
chrislindsay
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial