Magento媒体网址无效

时间:2015-09-30 10:58:04

标签: magento magento-1.9

我想清楚我已经完成了这篇文章:

Magento media url - get rid of 403 Forbidden

但我仍然无法从媒体库中获取图片网址。我已尝试过所有这些网址:

  

localhost / magento / media / customer / pic1.jpg(访问禁止错误)
  localhost / magento / media / index.html / customer / pic1.jpg(找不到对象错误但图像存在)
  localhost / magento / media / index.html(工作但没有用)

2 个答案:

答案 0 :(得分:1)

正确的链接是localhost / magento / media / customer / pic1.jpg。 尝试设置正确的文件所有权和权限。 对于apache2服务器默认配置:

var sigma = require('sigma');
var i,
    s,
    N = 100,
    E = 500,
    g = {
        nodes: [],
        edges: []
    };

// Generate a random graph:
for (i = 0; i < N; i++)
    g.nodes.push({
        id: 'n' + i,
        label: 'Node ' + i,
        x: Math.random(),
        y: Math.random(),
        size: Math.random(),
        color: '#666'
    });

for (i = 0; i < E; i++)
    g.edges.push({
        id: 'e' + i,
        source: 'n' + (Math.random() * N | 0),
        target: 'n' + (Math.random() * N | 0),
        size: Math.random(),
        color: '#ccc'
    });
sigma.renderers.def = sigma.renderers.canvas;
// Instantiate sigma:
s = new sigma({
    graph: g,
    container: document.getElementById('sigma-container'),
    type: 'canvas'
});

答案 1 :(得分:0)

我必须将index.html和.htaccess文件与媒体文件夹相同(如在我引用的链接中)并放在媒体/客户中。它现在已经修复并使用url:localhost / magento / media / customer / pic1.jpg。

相关问题