My site's physical path is inetpub/www/project-name bound to port 8888. When I call an API (assuming its name is /test), calling with http://localhost:8888/public/test and http://localhost:8888/test will return 404. The route went through index.php.
I fixed it by adding a web.config file in the project root directory (not inside /public/) with these rules
This issue is similar to #131 but on IIS
My site's physical path is
inetpub/www/project-name
bound to port8888
. When I call an API (assuming its name is/test
), calling withhttp://localhost:8888/public/test
andhttp://localhost:8888/test
will return 404. The route went through index.php.I fixed it by adding a
web.config
file in the project root directory (not inside/public/
) with these rulesNow it returns the results as intended.
Referring to my comment in https://github.com/slimphp/Slim-Skeleton/issues/131#issuecomment-566887084, converting the
.htaccess
inside the folder/public/
is not needed and you don't need to install any packages nor set the base path with$app->setBasePath($basePath)
like in Apache.