问题描述
我妻子有一个 joomla 2.5 网站
my wife have a joomla 2.5 site
她声称除了安装并随后卸载 Koowa 插件、Ninja 插件和 Ninjaboard 组件外,她什么也没做.
She claims that she has done nothing except, installing and and subsequently uninstalling Koowa plugi, Ninja plugin and Ninjaboard component.
无论如何,在那之后 joomla 的路径"发生了变化,以至于在域名和 HTML 呈现的路径之间,joomla 服务器现在似乎插入了/index.php"或/index.php/menu-item-姓名"
Anyway after that the joomla 'path' have changed such that between the domain name and the path rendered by HTML, the joomla server now seems to insert "/index.php" or "/index.php/menu-item-name"
例如点击如下链接:
<a href="images/some_folder/xxx.JPG">
指向类似:http://www.domain.contry/index.php/fun/images/some_folder/xxx.JPG
我们如何更改全局路径设置",以便
how to we change the 'global path settings' such that
<a href="images/some_folder/xxx.JPG">
指向http://www.domain.contry/images/some_folder/xxx.JPG
注意:我的 joomla 和 php 技能非常基础:)
NB: my joomla and php skills are very basic :)
更新:
我认为问题是这样的:
所有图像路径过去都是绝对"的,现在是相对的,所以如果我在index.php/some-menu"中并单击images/xxx.jpg",那么它会解析为index.php/some-menu/images/xxx.jpg',她的所有图像都在图像文件夹中,有什么方法可以使 joomla 中的所有图像路径绝对"而不是相对?
all the image paths used to be 'absolute' and are now relative, so if I am in 'index.php/some-menu' and click 'images/xxx.jpg' then it resolves to 'index.php/some-menu/images/xxx.jpg', she has all her images in the image folder, is there some way make all image paths 'absolute' instead of relative in joomla?
因为使用 firebug 将 'images/xxx.jpg' 更改为 '/images/xxx.jpg' 可以解决问题...
because changing 'images/xxx.jpg' to '/images/xxx.jpg' with firebug fixes the problem...
如果在 joomla 中是不可能的...你认为它有多糟糕:下载sql数据库并运行一个类似于
if it is not possible in joomla... how bad do you think it is to:download the sql databaseand run a regex akin to
s/<.+?="(images)/[ws]+?.[wd]+)".*?>//$1/g
推荐答案
在站点"选项卡下查看全局配置以了解 SEO 设置.确保您已启用 URL 重写,并在必要时按照工具提示中的说明重命名 htaccess.txt(Linux 服务器)或 web.config.txt(Windows 服务器).
Look in your global configuration under the Site tab for your SEO settings. Make sure you have URL rewriting enabled, and follow the directions in the tooltip to rename htaccess.txt (Linux servers) or web.config.txt (Windows servers) if necessary.
如果此时您在站点上遇到服务器错误,请尝试在 .htaccess 中取消注释 RewriteBase/
.
If you get a server error on the site at this point, try uncommenting RewriteBase /
in .htaccess.
这篇关于joomla 前置到“路径"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!