IIS 下如何配置 Laravel

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

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

《L04 微信小程序从零到发布》
从小程序个人账户申请开始,带你一步步进行开发一个微信小程序,直到提交微信控制台上线发布。
《L03 构架 API 服务器》
你将学到如 RESTFul 设计风格、PostMan 的使用、OAuth 流程,JWT 概念及使用 和 API 开发相关的进阶知识。
讨论数量: 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 2年前

讨论应以学习和精进为目的。请勿发布不友善或者负能量的内容,与人为善,比聪明更重要!