2区1主机 - >域名URL重写 [英] 2 domains 1 host -> domain url rewrite
问题描述
我有一个(PHP)字preSS的网站上,让我们说 domain1.com
,我又买了域名,并指出它在同一主机 domain1.com
...
i have a (php) wordpress site on let's say domain1.com
and i bought another domain and pointed it to the same host as domain1.com
...
所以,现在,我有这在地址栏中提供的字preSS的网站,当我把 domain1.com
一个托管帐户,我得到的页面。当我把 domain2.com
,我也得到了同样的页面(becouse我重定向 domain2.com
指向我托管帐户),这很好。但我怎么能有2个域名指向同一个主机,并保持域preFIX用户inputed ..所以,当用户输入 domain1.com/index.php
或 domain2.com/index.php
,他会从服务器提供相同的页面,但用户必须在其地址栏中不同的地址?
So now, i have that one hosting account which serves the wordpress site and when i put domain1.com
in the address bar, i get that page. When i put domain2.com
, I also get that same page (becouse I redirected domain2.com
to point to my hosting account), and that's fine. But how can I have 2 domains point to the same host, and keep the domain prefix user inputed.. so that when user inputs domain1.com/index.php
or domain2.com/index.php
, he would be served the same page from the server, but the user would have a different address in his address bar?
我希望我的问题是清楚的。
I hope my question is clear.
感谢您的时间...
推荐答案
所以我最后做的是 - >
so what I finally did was ->
更改DNS在新的域名指向我的托管帐户,并通过的cPanel添加新域绑定域名。
change the dns on the new domain to point to my hosting account and through cpanel add that new domain as "parked domain"..
也许这可以帮助别人。
这篇关于2区1主机 - >域名URL重写的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!