Laravel 6.0 IIS添加虚拟目录HTTP错误404.0-未找到
我在windows 10主机运行Laravel项目中使用IIS,在主页上它工作,但我单击“登录”或“注册”它不工作 这是我的设置(添加虚拟目录) 如果本地主机/tms正常工作Laravel 6.0 IIS添加虚拟目录HTTP错误404.0-未找到,laravel,iis,virtual-directory,Laravel,Iis,Virtual Directory,我在windows 10主机运行Laravel项目中使用IIS,在主页上它工作,但我单击“登录”或“注册”它不工作 这是我的设置(添加虚拟目录) 如果本地主机/tms正常工作 但是localhost/tms/login HTTP error 404感谢您提供了我的答案 在public dir中添加文件web.config并粘贴规则: <?xml version="1.0" encoding="UTF-8"?> <configuration> <system
但是localhost/tms/login HTTP error 404感谢您提供了我的答案 在public dir中添加文件web.config并粘贴规则:
<?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>
</configuration>
感谢您提供我的答案