redirect - 域的 DNS 级别的通配符重定向
问题描述
假设我有域long_domain_name.tld
并想short.tld
用作 (alias) 的短域名long_domain_name.tld
,但是在我的 DNS 设置中,当我设置重定向URL REDIRECT
记录时: URL将重定向到但我想重定向到.short.tld
long_domain_name.tld
short.tld/x/y
long_domain_name.tld
long_domain_name.tld/x/y
问题:
如何设置short.tld/*
重定向到long_domain_name.tld/*
DNS 级别?
解决方案
没有 DNS 级别重定向之类的东西。一些 DNS 托管服务提供商提供此功能,但这本质上是一个通过重定向响应的 HTTP Web 服务器/应用程序,因此答案非常特定于 DNS 提供商,应该在他们的文档中或在他们的支持下进行搜索。
话虽如此:),如果是 namecheap,您似乎需要在目标 URL 的末尾添加一个正斜杠“/”:
http://destination.tld
在>> 之后添加此特殊符号后http://destination.tld/
,URLdomain.tld/xyz.html
或domain.tld/home
将用户分别重定向到http://destination.tld/xyz.html
或http://destination.tld/home
(如果子文件夹(/xyz.html
或/home
)存在于上destination.tld
)。放入原始 URL (domain.tld/anything) 的所有值都将包含在目标地址中并应用于结果 (
http://destination.tld/anything
)。
推荐阅读
- react-native - 在 /expo/build/Notifications 中找不到 AsyncStorage 模块
- regex - 如果H返回文本,如何将“P1”输入C?谷歌表格
- apache-spark - Parquet 文件是高度结构化的还是半结构化的?
- visual-studio - 此文件已在设计器不支持的 Xcode 版本中编辑。支持以 Xcode 11.3.0 或更早的格式保存的文档
- javascript - 如何在我的案例“-”中找到字符串中的特定字符并在javascript js中用“_”替换它
- windows - 我在哪里可以获得 Windows 10 Checked Builds?
- sql-server - 主数据库中的用户可以访问所有其他实例吗
- r - 测试是否存在显式传递给 R 中的函数的变量
- json - 将键值从一个json依次附加到另一个json
- html - 输入是一个自闭合标签。或不?