如何使用Google Domains屏蔽URL重定向 [英] How to mask URL redirect with Google Domains
问题描述
在Google Domains上,我拥有 www.example.com
.我还可以通过 www.university.com/~myname
免费托管.
On Google Domains, I own www.example.com
. I also have hosting for free at www.university.com/~myname
.
我希望能够转发 www.example.com
到 www.university.com/~myname
,
但是我希望域仍然显示为 www.example.com
.
but I want the domain to still show as www.example.com
.
我也想要
www.example.com/something/something.txt
转发至
www.university.com/~myname/something/something.txt
,
,URL仍显示 www.example.com/something/something.txt
.
我该怎么做?
(I know this question exists, but the settings page is very out of date: How to mask the domain forward from Google domains without Google app)
推荐答案
如果没有人站起来将重定向请求的Web服务器,这是不可能的.
This is not possible without having someone standup a webserver that will redirect requests.
使用CNAME可以将www.example.com屏蔽为www.university.com,因为此转换完全基于DNS.www.university.com/~myname的概念是URL路径的HTTP概念,您需要HTTP服务器(也称为Web服务器)来进行此重定向.
Using CNAMEs you can mask www.example.com to www.university.com since this translation is purely based on DNS. The concept of www.university.com/~myname is an HTTP concept of URL paths and you need an HTTP server (aka webserver) to do this redirection.
Look at URL forwarding services (NameCheap offers such a service https://www.namecheap.com/support/knowledgebase/article.aspx/545/51/how-do-i-set-up-url-redirect-when-i-use-your-freedns-service when you use their FreeDNS servers for your DNS). You don't need to move your domain registration to them (you can keep that with Google), just move your NS records to namecheap servers to use their redirection service.
这篇关于如何使用Google Domains屏蔽URL重定向的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!