简体   繁体   English

Joomla网站网址

[英]Joomla Site URL

I have a website on a 1and1 server. 我在1and1服务器上有一个网站。 I have 2 domains on the package; 我的包装上有2个域; the default url somenumbers.websitehome.co.uk and my actual URL. 默认网址somenumbers.websitehome.co.uk和我的实际网址。

The problem is, Joomla quotes the somoenumbers.websitehome.co.uk in system e-mails instead of my actual URL. 问题是,Joomla在系统电子邮件中引用了somoenumbers.websitehome.co.uk而不是我的实际URL。 They both point to the same directory I just don't want to give a stupid URL to my users. 它们都指向同一目录,我只是不想给用户一个愚蠢的URL。

I think I have narrowed it down to the $siteUrl variable but I'm not sure how to go from here. 我想我已经将其范围缩小到$ siteUrl变量,但是我不确定如何从这里开始。

Thanks 谢谢

James 詹姆士

At first I thought this sounded largely like a DNS issue - but then you said you only have 1 Joomla installation and both domains point to that directory. 起初,我认为这在很大程度上听起来像是DNS问题-但后来您说您只有1个Joomla安装,并且两个域都指向该目录。

If they're both pointing to the same directory, then both domains will display the same Joomla installation. 如果它们都指向同一目录,则两个域将显示相同的Joomla安装。 That is, unless you're checking to see where they are coming from and having the content display dynamically based upon how they got to your site - but from your comments I doubt you're doing that. 也就是说,除非您要检查它们的来源,并根据它们到达站点的方式来动态显示内容-但是从您的评论中我怀疑您正在这样做。 How your domains are behaving is the expected response if you're pointing them both to the same directory. 如果将两个域都指向同一个目录,则域的行为将是预期的响应。

If you want 2 sites on the same hosting? 如果要在同一主机上放置2个站点? Setup 2 databases (or apply different prefix for each site and use 1 database) and set up each website in it's own directory. 设置2个数据库(或为每个站点应用不同的前缀并使用1个数据库),并在其自己的目录中设置每个网站。

Adjust the DNS of each domain name (and subdomain name) to point the appropriate directory. 调整每个域名(和子域名)的DNS以指向适当的目录。

From there, use the .htaccess file and SEF URL's to get rid of any indicator of the directory so that it displays the same as if the site was in the root directory. 从那里,使用.htaccess文件和SEF URL除去目录的任何指示符,以便显示与站点位于根目录中相同的内容。

That is the best way to accomplish what you're after - because from the sounds of it Joomla is doing exactly as it should, displaying correctly what is in the directory since both domain names point to the same directory. 这是完成您要执行的操作的最佳方法-因为从它的声音来看,Joomla的运行完全正确,因为两个域名都指向同一个目录,因此正确显示了目录中的内容。

$ siteUrl应该留空。

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

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