【发布时间】:2016-03-03 23:44:24
【问题描述】:
我已经下载并安装了 Magento 2,但脚本和 css 出现 404 错误。我的图片路径的一个例子是:http://www.arredomobilionline.com/pub/static/frontend/Magento/luma/it_IT/images/logo.svg
我已经尝试过这个解决方案:
打开 app/etc/di.xml 并找到 virtualType name="developerMaterialization" 部分。在该部分中,您会发现 需要修改或删除的项目名称="view_preprocessed"。 您可以通过更改内容来修改它 Magento\Framework\App\View\Asset\MaterializationStrategy\Symlink 到 Magento\Framework\App\View\Asset\MaterializationStrategy\Copy
默认情况下,在我的默认 di.xml 文件中:
<virtualType name="developerMaterialization" type="Magento\Framework\App\View\Asset\MaterializationStrategy\Factory">
<arguments>
<argument name="strategiesList" xsi:type="array">
<item name="view_preprocessed" xsi:type="object">Magento\Framework\App\View\Asset\MaterializationStrategy\Symlink</item>
<item name="default" xsi:type="object">Magento\Framework\App\View\Asset\MaterializationStrategy\Copy</item>
</argument>
</arguments>
</virtualType>
我试图删除第一个符号链接部分或将其更改为“复制”,但它不起作用。 我还为每个文件设置了 777 权限。
【问题讨论】:
标签: javascript css magento http-status-code-404 magento2