如何将网站从一个网址移动到另一个网址?

时间:2022-11-15 19:48:00

I have an ASP.NET web application hosted on DiscountASP.NET with its domain name registered on GoDaddy. This site is working perfectly and runs great, but I hate the domain name.

我在DiscountASP.NET上托管了一个ASP.NET Web应用程序,其域名在GoDaddy上注册。这个网站运行良好,运行良好,但我讨厌域名。

So now, I decide to purchase a domain name I like better. How do I set it up so that this domain name runs the same web app as my original application, but using the new domain name instead of the old one (i.e. I don't want to redirect to the old url, I want everything to work under the new url)?

所以现在,我决定购买一个我更喜欢的域名。如何设置它以使该域名与我的原始应用程序运行相同的Web应用程序,但使用新域名而不是旧域名(即我不想重定向到旧URL,我希望所有内容都是在新网址下工作)?

2 个解决方案

#1


6  

This should be quite simple. Go to the host/registrar of your new domain and point it to the same ip addresses that the godaddy url points to.

这应该很简单。转到新域的主机/注册商,并将其指向godaddy网址指向的相同IP地址。

You can have the old url and new url coexist. The DNS servers just map to the the physical IP your app is hosted on.

您可以将旧网址和新网址共存。 DNS服务器只映射到您的应用程序托管的物理IP。

If you've been naughty and use absolute urls/directories in your app, you will have to rewrite some code. All the while reciting the mantra... that's why I should have used relative references...

如果你一直顽皮并在你的应用程序中使用绝对的URL /目录,你将不得不重写一些代码。一直在背诵咒语...这就是为什么我应该使用相对参考...

#2


2  

Either move the application files over and create a redirect from the old URL to the new, or set up a rewrite under the new URL to transparently pass requests to the existing one.

移动应用程序文件并创建从旧URL到新URL的重定向,或者在新URL下设置重写以透明地将请求传递给现有URL。

#1


6  

This should be quite simple. Go to the host/registrar of your new domain and point it to the same ip addresses that the godaddy url points to.

这应该很简单。转到新域的主机/注册商,并将其指向godaddy网址指向的相同IP地址。

You can have the old url and new url coexist. The DNS servers just map to the the physical IP your app is hosted on.

您可以将旧网址和新网址共存。 DNS服务器只映射到您的应用程序托管的物理IP。

If you've been naughty and use absolute urls/directories in your app, you will have to rewrite some code. All the while reciting the mantra... that's why I should have used relative references...

如果你一直顽皮并在你的应用程序中使用绝对的URL /目录,你将不得不重写一些代码。一直在背诵咒语...这就是为什么我应该使用相对参考...

#2


2  

Either move the application files over and create a redirect from the old URL to the new, or set up a rewrite under the new URL to transparently pass requests to the existing one.

移动应用程序文件并创建从旧URL到新URL的重定向,或者在新URL下设置重写以透明地将请求传递给现有URL。