Mod 重写 MS 主机 隐藏长而令人厌烦的 URL 通过显示短 URL?

发布于 2024-08-25 05:51:18 字数 371 浏览 2 评论 0原文

场景:我有一个 PHP 论坛和一个 Asp.Net 站点,分别托管在 Linux 和 MS 托管上(很明显吧?!)。

我的域 ABC.com 当前配置有 PHP 主机,而我的 ASP.Net 站点使用默认的 1and1 生成的 URL (s0987465.onlinehome.us)。

所以我的问题是,如何显示包含 s0987465.onlinehome.us 的任何 URL 的 ABC.com?

示例:s0987465.onlinehome.us/test.aspx?id=100 应通过显示 s0987465.onlinehome.us 生成的内容在地址栏中显示 ABC.com 或 ABC.com/test.aspx?id=100?

Scenario : I have a PHP Forum and a Asp.Net site hosted on Linux and MS Hosting respectively (obvious right?!).

My domain ABC.com is currently configured with PHP host whereas my ASP.Net site is using the default 1and1 generated URL (s0987465.onlinehome.us).

So my question is, how to display ABC.com for any URL that includes s0987465.onlinehome.us?

Example : s0987465.onlinehome.us/test.aspx?id=100 should display ABC.com or ABC.com/test.aspx?id=100 in the address bar by displaying content generated by s0987465.onlinehome.us?

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

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

发布评论

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

评论(1

半城柳色半声笛 2024-09-01 05:51:18
  1. 您是否考虑过在 ASP.Net 站点上简单地使用 abc.com 子域?例如。 www2.abc.com

  2. 除此之外,您还可以在 PHP 站点上的 IFrame 中显示 ASP.Net 站点中的页面。这会屏蔽 ASP.Net 中的原始域。

  3. 进一步。一些 ASP.Net 托管公司支持 PHP。因此,您可以在单个域上运行 PHP 和 ASP.Net 站点。

但我不认为你可以重写 URL 的域部分。如果可以的话,这将是一个巨大的安全漏洞。

  1. Have you thought about simply using a subdomain of abc.com on your ASP.Net site? Eg. www2.abc.com.

  2. On top of that, or otherwise, you can display your pages from your ASP.Net site in an IFrame on your PHP site. That would mask the original domain from your ASP.Net.

  3. Further. Some ASP.Net hosting firms support PHP. So you can run both the PHP and ASP.Net sites on a single domain.

But I don't think you can rewrite the domain part of a URL. That would be a huge security hole if you could.

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