-5

I've a issue with Cakephp Version 3.2 on IIS. But, Cakephp Version 2.2 is working well in the same setup environment. Not sure why?

Here's my web.config file.

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <system.webServer>
        <rewrite>
            <rules>
                <rule name="Exclude direct access to webroot/*"
                  stopProcessing="true">
                    <match url="^webroot/(.*)$" ignoreCase="false" />
                    <action type="None" />
                </rule>
                <rule name="Rewrite routed access to assets(img, css, files, js, favicon)"
                  stopProcessing="true">
                    <match url="^(img|css|files|js|favicon.ico)(.*)$" />
                    <action type="Rewrite" url="webroot/{R:1}{R:2}"
                      appendQueryString="false" />
                </rule>
                <rule name="Rewrite requested file/folder to index.php"
                  stopProcessing="true">
                    <match url="^(.*)$" ignoreCase="false" />
                    <action type="Rewrite" url="index.php"
                      appendQueryString="true" />
                </rule>
            </rules>
        </rewrite>
    </system.webServer>
</configuration>

The above content was copied from the Official Cakephp forum.

Whatever we type in URL, I get the below response

enter image description here

Note :

I tried all the related links in SO & I posted this after trying all the provided solutions but none of them worked.

More Information :

IIS Ver - 10 Cakephp - 3.2

I repeat again, Cakephp 2.2 works well.

user3289108
  • 770
  • 5
  • 10
  • 29

1 Answers1

0

I would like to answer my own question on how i solved the problem. The problem is not with web.config but the real problem is in .gitignore.

By Default it adds vendor directory to .gitignore. Since it doesn't added to git, those errors were occurred.

user3289108
  • 770
  • 5
  • 10
  • 29