首页 > 解决方案 > 域的 DNS 级别的通配符重定向

问题描述

假设我有域long_domain_name.tld并想short.tld用作 (alias) 的短域名long_domain_name.tld,但是在我的 DNS 设置中,当我设置重定向URL REDIRECT记录时: URL将重定向到但我想重定向到.short.tldlong_domain_name.tldshort.tld/x/ylong_domain_name.tldlong_domain_name.tld/x/y

问题:

如何设置short.tld/*重定向到long_domain_name.tld/* DNS 级别

标签: redirectdnsnamecheap

解决方案


没有 DNS 级别重定向之类的东西。一些 DNS 托管服务提供商提供此功能,但这本质上是一个通过重定向响应的 HTTP Web 服务器/应用程序,因此答案非常特定于 DNS 提供商,应该在他们的文档中或在他们的支持下进行搜索。

话虽如此:),如果是 namecheap,您似乎需要在目标 URL 的末尾添加一个正斜杠“/”:

http://destination.tld在>> 之后添加此特殊符号后http://destination.tld/,URLdomain.tld/xyz.htmldomain.tld/home将用户分别重定向到 http://destination.tld/xyz.htmlhttp://destination.tld/home (如果子文件夹(/xyz.html/home)存在于上destination.tld)。

放入原始 URL (domain.tld/anything) 的所有值都将包含在目标地址中并应用于结果 ( http://destination.tld/anything)。

https://www.namecheap.com/support/knowledgebase/article.aspx/10043/2237/url-redirect-with-parameters#specificpage


推荐阅读