Moh*_*oha 1 windows iis laravel laravel-5
我有一个简单的 Laravel 5 应用程序。它是在 Xampp 上开发的,并且运行良好。我把它复制到生产服务器上,但它不起作用。web.config 文件有问题,因为如果我删除它,那么该应用程序可以与 index.php/path 完美配合
我的网络配置如下:
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="Rule 1" stopProcessing="true">
<match url="^(.*)/$" ignoreCase="false" />
<action type="Redirect" redirectType="Permanent" url="/{R:1}" />
</rule>
<rule name="Rule 2" stopProcessing="true">
<match url="^" ignoreCase="false" />
<conditions>
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" negate="true" />
</conditions>
<action type="Rewrite" url="index.php" />
</rule>
</rules>
</rewrite>
</system.webServer>
Run Code Online (Sandbox Code Playgroud)
该应用程序位于网站的子文件夹中,我无法创建新网站,但我可以根据需要重新启动 IIS。我真的不太了解 IIS(事实上我讨厌它),所以我不知道在哪里检查,但由于该应用程序在没有 web.config 的情况下工作,我认为它一定是罪魁祸首。