在本地设置域名进行测试?

发布于 2024-11-18 09:33:02 字数 140 浏览 7 评论 0原文

我将使用一个托管帐户,其中停放了多个域名以及一个主域名。我需要能够根据访问的域显示不同的内容。所以,我的问题是,如何在本地进行测试?

  • 我有 Vista
  • 我使用 XAMPP

对此有任何帮助吗?

I will be using one hosting account with several domains parked on it along with a main domain name. I need to be able to show different content based on what domain is being accessed. So, my question is, how can I test this locally?

  • I have Vista
  • I use XAMPP

Any help with this would be greatly appreciated?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

街道布景 2024-11-25 09:33:02

您可以在主机文件中定义多个域。

你可以在C:\Windows\System32\drivers\etc中找到它,

那里有一些示例可以帮助你理解它是如何工作的。然后创建一个页面(例如index.php)并解析那里的域并将其重定向到相关域。

You can define multiple domains in your hosts file.

you can find it C:\Windows\System32\drivers\etc

There are examples written there to help you understand, how it works. then create a page lets say index.php and parse the domain there and redirect it to relevant domain.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文