两个 URL,相同的服务器/文件?

发布于 2024-09-27 19:25:53 字数 205 浏览 0 评论 0原文

我想要两个 URL(例如:www.mycoolsite.com 和 www.myfunsite.com)并将它们指向同一服务器,并使用一些相同的文件。我想要每个站点都有不同的主页和 css,但其他一切都是相同的。

我的虚拟主机允许我“停放”域名,但这会更改用户看到的 URL,并且我不确定是否有任何方法可以检测用户最初输入的 URL。

有什么想法可以实现这一点吗?

I would like to have two URL (ex: www.mycoolsite.com and www.myfunsite.com) and point them to the same server, and use some of the same files. I want a different homepage and css for each site, but evernthing else would be identical.

My webhost allows me to 'park' a domain, but that changes the URL that the user sees and I'm not sure if there is anyway to detect which URL the user originally entered.

Any ideas how this can be accomplished?

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

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

发布评论

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

评论(1

错爱 2024-10-04 19:25:53

我认为您需要 HTTP 301 永久重定向。
示例

I think you want a HTTP 301 permanent redirect.
Example

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