IIS 下如何配置 Laravel

大家好,请教个问题,最近刚开始在学习和使用 laravel5. 我的系统是 win8.1。对 laravel 配置的是 IIS+php5.6+mysql5.6.

有一个问题就是 laravel 放到 iis 里,测试 index.php(http://localhost)是可以正常运行的。但是我针对 laravel 添加 page 功能以后,再运行(http://localhost/admin), 浏览器报错,找不到该页面。我该怎么办

《L02 从零构建论坛系统》
以构建论坛项目 LaraBBS 为线索,展开对 Laravel 框架的全面学习。应用程序架构思路贴近 Laravel 框架的设计哲学。
《L01 基础入门》
我们将带你从零开发一个项目并部署到线上,本课程教授 Web 开发中专业、实用的技能,如 Git 工作流、Laravel Mix 前端工作流等。
讨论数量: 3
Summer

@JobsLong 哈哈,你闲下来啦?

10年前 评论

在和入口文件同一个文件夹里增加 web.config 增加

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <system.webServer>
 <rewrite>
  <rules>
  <rule name="OrgPage" stopProcessing="true">
  <match url="^(.*)$" />
  <conditions logicalGrouping="MatchAll">
  <add input="{HTTP_HOST}" pattern="^(.*)$" />
  <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
  <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
  </conditions>
  <action type="Rewrite" url="index.php/{R:1}" />
  </rule>
  </rules>
 </rewrite>
        <directoryBrowse enabled="false" />
                <security>
          <requestFiltering allowDoubleEscaping="True" />
        </security>
        <defaultDocument>
            <files>
                <clear />
                <add value="index.php" />
                <add value="Default.htm" />
                <add value="Default.asp" />
                <add value="index.htm" />
                <add value="index.html" />
                <add value="iisstart.htm" />
            </files>
        </defaultDocument>
    </system.webServer>

</configuration>

参考下 https://www.kancloud.cn/manual/thinkphp5/1...

5年前 评论
scy58 3年前