Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/drupal/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/video/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
启用url重写后DRUPAL损坏的图像_Drupal_Url Rewriting_Brokenimage - Fatal编程技术网

启用url重写后DRUPAL损坏的图像

启用url重写后DRUPAL损坏的图像,drupal,url-rewriting,brokenimage,Drupal,Url Rewriting,Brokenimage,我在Drupal上打开了URL重写,一些URL图像被破坏 例如: local/tw/sites/all/themes/tw/images/1-p1.jpg local/tw/content/sites/all/themes/tw/images/1-p1.jpg 或 local/tw/sites/all/themes/tw/images/2-p1.jpg成为 local/tw/node/sites/all/themes/tw/images/2-p1.jpg 有什么想法吗?如果您使用相对路径,并且您

我在Drupal上打开了URL重写,一些URL图像被破坏

例如:

local/tw/sites/all/themes/tw/images/1-p1.jpg local/tw/content/sites/all/themes/tw/images/1-p1.jpg

local/tw/sites/all/themes/tw/images/2-p1.jpg成为 local/tw/node/sites/all/themes/tw/images/2-p1.jpg


有什么想法吗?

如果您使用相对路径,并且您谈论的是节点内的内容,这是完全正常的,因为“node/”被解释为一个目录


您可以在image src之前添加“/”,或者使用提供简单文件的模块:relative/path/to/file语法来解决此问题。

如何在模板中输出图像?