我需要将其转换为.haccess。我需要将其与Laravel一起使用,因为我当前的Web服务器配置存在问题,无法像adminlte一样从/ var / www / globapp / public中读取任何CSS或文件夹。是的,我检查了权限,并尝试使用-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>
~
~
答案 0 :(得分:-1)
这不是网络服务器的问题。问题是Laravel尝试公开而不是公开。像这样
/ var / www / globapp / public / public / adminlte
我无法修复代码,但我是服务器员。所以我用软链接解决了这个问题。
ln -s /var/www/globapp/public/ /var/www/globapp/public/public
还有!!