简体   繁体   English

文章页面上的Joomla图片路径

[英]Joomla Image path on article pages

This is driving me insane! 这让我发疯!

  1. My joomla image folder is "images" 我的joomla图片文件夹是“图片”
  2. Images appear fine on my home page 图片在我的首页上显示正常
  3. when I create an article the image path turns into article_name/images but the correct path is /images and in global + media settings it shows images 当我创建文章时,图像路径变成article_name / images,但是正确的路径是/ images,并且在全局+媒体设置中它显示图像
  4. I disabled SEF, cleared cache F - no difference 我禁用了SEF,清除了缓存F- 没什么区别
  5. I tried to disable URL rewriting - no difference 我尝试禁用URL重写- 没什么区别
  6. Even the site logo path changes on a article page to article_name/images/imagename.jpg when it should be images/imagename.jpg 甚至网站徽标路径在文章页面上也应更改为article / name / images / imagename.jpg,而应为images / imagename.jpg
  7. The joomla site is installed in the public_html folder joomla网站安装在public_html文件夹中

Is there a rewrite condition I can use in htaccess file to make sure images always load from the images folder and do not have the article name added? 我可以在htaccess文件中使用重写条件来确保始终从图像文件夹加载图像并且没有添加商品名称吗?

I found a link which might solve the problem. 我找到了可能解决问题的链接。 Here's the link: https://forum.joomla.org/viewtopic.php?t=298582 这是链接: https : //forum.joomla.org/viewtopic.php?t=298582

Modify inlcudes/application.php at row 108, from this: 从此处修改inlcudes / application.php在第108行:

Code: Select all 代码:全选

$document->setBase(JURI::current()); $ document-> setBase(JURI :: current());

to this: 对此:

Code: Select all 代码:全选

$document->setBase(JURI::base()) ; $ document-> setBase(JURI :: base());

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM