【问题标题】:convert iis web config to apache htaccess for laravel将 iis web 配置转换为 laravel 的 apache htaccess
【发布时间】:2018-12-23 00:01:31
【问题描述】:

我需要将其转换为 .haccess。我需要将它与 Laravel 一起使用,因为我当前的 Web 服务器配置存在问题,我无法从 /var/www/globapp/public 中读取任何 css 或文件夹,例如 adminlte。是的,我检查了权限并尝试使用 -R 777 获取此目录和存储目录。它返回 404。现在我正在使用 apache。但我想我想念一些东西。 谢谢。

<configuration>
  <system.webServer>
    <rewrite>
      <rules>
        <rule name="Imported Rule 1" stopProcessing="true">
          <match url="^(.*)/$" ignoreCase="false" />
          <conditions>
            <add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" negate="true" />
          </conditions>
          <action type="Redirect" redirectType="Permanent" url="/{R:1}" />
        </rule>
        <rule name="Imported 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>
~                                                                                                                                                                                                    
~                            

【问题讨论】:

    标签: php apache iis laravel-5 web


    【解决方案1】:

    这不是网络服务器的问题。问题是 Laravel 尝试公开而不是公开。像这样

    /var/www/globapp/public/public/adminlte

    我无法修复代码,但我是一名服务员。所以我喜欢这个软链接。

    ln -s /var/www/globapp/public/ /var/www/globapp/public/public
    

    和 vola !

    【讨论】:

      猜你喜欢
      • 2012-01-30
      • 1970-01-01
      • 2011-04-25
      • 2023-02-12
      • 1970-01-01
      • 1970-01-01
      • 2015-05-21
      • 2011-11-25
      • 2021-12-28
      相关资源
      最近更新 更多