Hi,
I have two solution with web.config file (generated by IIS )
[font="Arial Black"]1st one :[/font]
[xml]<httpRedirect enabled="true" destination=" http://127.0.0.10/yii2-app-basic/web/index.php" exactDestination="false" childOnly="true" httpResponseStatus="Found" />[/xml]
[list=1]
[*]When you tape this url :
http://127.0.0.10/ — >
you arrive this url : http://127.0.1.10/yii2-app-basic/web/index.php/
[*]but when you write
http://127.0.0.10/index.php or http://127.0.0.10/toto — >
You see : http://127.0.1.10/yii2-app-basic/web/index.php/index.php or
http://127.0.1.10/yii2-app-basic/web/index.php/toto
So it is [color="#8B0000"]404[/color] Page not found.
[*]if you tape
http://127.0.1.10/toto/toto.php — >
you can see the contents toto.php file in toto directory.
[/list]
or you can also try next one
2nd one :
[xml] <rewrite>
<rules>
<rule name="Rewrite Only Root to Virtual Directory" stopProcessing="true">
<match url="^/?$" />
<conditions>
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
</conditions>
<action type="Rewrite" url="/yii2-app-basic/web/index.php" />
</rule>
</rules>
</rewrite>[/xml]
[list=1]
[*]When you tape this url :
http://127.0.0.10/ — >
you see the same contents ‘Congratulations! page’ (yii2-app-basic/web/index.php/site/index) without change http://127.0.0.10/
[*]but when you write
http://127.0.0.10/index.php or http://127.0.0.10/toto — >
You see the contents index.php or toto.php file in root directory. So You can not see ‘Congratulations! page’ (yii2-app-basic/web/index.php/site/index)
[*]if you tape
http://127.0.1.10/toto/toto.php — >
you can see the contents toto.php file in toto directory.
[/list]
Bye