简体   繁体   English

Joomla 2.5.9 URL中重复的​​域名

[英]Joomla 2.5.9 Domain name repeating in URL

I have installed the Joomla 2.5.9 on Windows server with IIS7 . 我已经使用IIS7在Windows服务器上安装了Joomla 2.5.9。 :) I disabled all the SEF setting in configuration. :)我禁用了配置中的所有SEF设置。

Now , I logged in to admin of joomla 2.5.9. 现在,我登录到joomla 2.5.9的管理员。 When I see the public side , it show it perfect.. but when I go for any other link.. it have multiple time of domain name in url.. 当我看到公开的一面时,它表明它是完美的..但是当我进行任何其他链接时..它在URL中具有多个域名。

like... 喜欢...

http://domainname.com/index.php?option=com_content&view=article&id=6&Itemid=102

I tried with enabling SEO URL , and enabled the web.conf. 我尝试启用SEO URL并启用了web.conf。 and settings like below, 和如下设置

Search Engine Friendly URLs -yes Use URL rewriting -yes Adds Suffix to URL -yes. 搜索引擎友好的URL-是使用URL重写-yes将后缀添加到URL-是。

http://domainname.com/domainname.com/features.html

is this error with joomla 2.5.9??? 是joomla 2.5.9的错误???

Thanks, Gaurish 谢谢,高卢

http://forum.joomla.org/viewtopic.php?f=615&t=820080 http://forum.joomla.org/viewtopic.php?f=615&t=820080

Change in configuration.php 更改configuration.php

var $live_site = '';

to

var $live_site = 'http://domainname.com';

I tested with some configuration & that works for me.. 我测试了一些配置,对我有用。
I tried JTC code, 我尝试了JTC代码,

public $live_site = 'http://domainname.com';

It works on front-end, but throws the error in backend , even I am not able to Login in admin. 它可以在前端运行,但会在后端抛出错误,即使我无法登录admin。

So, I changed the configuration file as below, 因此,我如下更改了配置文件,

$url = 'http://' . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'];
if (true== strpos(strtolower($url),'administrator')) :

class JConfig {
.......
public $live_site = '';
......
}
else:
class JConfig {
......
public $live_site = 'http://www.domainname.com/';
.....
}
endif;

and this work perfectly for me.. all the URL's on front-end are showing correct, not domain name repeated. 这对我来说是完美的。前端的所有URL都显示正确,而不是重复的域名。

But URL's in back are showing same as early, but I can do the updates & admin task there.. that really don't interrupt me. 但是后面的URL显示得很早,但是我可以在那里执行更新和管理任务。这真的不会打扰我。

One more think , I am not able update global configuration file.. as we edited it .. so I need do it manually. 再想一想,我无法更新全局配置文件..,因为我们对其进行了编辑..所以我需要手动进行。

Thanks, Gaurish 谢谢,高卢

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

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