1

My app giving error (404 not found) when try access route:

$app->get('/test/', function () { 
  echo "Hello, World! test"; 
});

But is ok, when try access:

$app->get('/', function () { 
  echo "Hello, World!"; 
});

Need configure Allowoverride All ? how i can do it, using web.config IIS ?]

UPDATE.. i create web.config file with code: Not using htaccess now, only web.config.. but still not working

URL Rewrite Module Error.

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <system.webServer>
        <rewrite>
            <rules>
                <rule name="slim" patternSyntax="Wildcard">
                    <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>
            </rules>
        </rewrite>
    </system.webServer>
</configuration>
Kraang Prime
  • 9,981
  • 10
  • 58
  • 124
  • Your `RewriteCond %{REQUEST_FILENAME} !-d` condition means that if the folder exists, do not rewrite. From your `$app->get()` code, it is clear that the folder/path `/test/` either does not exist, or does not have proper permissions. Also, you are trying to use `.htaccess` on an IIS server -- you might want to look [translate htaccess content to iis webconfig](https://www.iis.net/learn/application-frameworks/install-and-configure-php-applications-on-iis/translate-htaccess-content-to-iis-webconfig) – Kraang Prime Jan 06 '17 at 17:04
  • @KraangPrime update check plz – Caio Andrian Jan 06 '17 at 17:14
  • Do you have the [rewrite module installed](http://stackoverflow.com/a/25998019/3504007) and enabled ? – Kraang Prime Jan 06 '17 at 17:21
  • i think not.. how do it plz? – Caio Andrian Jan 06 '17 at 17:24
  • See the link in my last comment. That is a link to a solution which shows how to install it. – Kraang Prime Jan 06 '17 at 17:29
  • Yes is active and installed.. =/ – Caio Andrian Jan 06 '17 at 17:53

1 Answers1

0

PROBLEM SOLVED ;D

i believe was php (5.4.x) version and doctrine need (5.5.x +)

  • Glad to hear you resolved the problem. If you could expand on this solution so that it may help someone else with the same problem, that would be useful. I also added the `php` tag to your question. – Kraang Prime Jan 06 '17 at 18:57
  • yep ill do it, now the problem is error 405 when try PUT, and sometimes error 500 when trying POST.. with slim – Caio Andrian Jan 06 '17 at 19:03