如何取消屏蔽从我的域屏蔽站点到外部站点的链接?
我注册了域名 www.a.com 然后,我使用屏蔽(使用 GoDaddy)将流量从 www.a.com 转发到 www.really.long.url.com,这样用户在访问我的网站时只会在地址栏中看到 www.a.com。 问题是,如果用户在我的网站上点击 www.google.com 的链接,他们会被定向到 Google,但他们的地址栏仍然显示 www.a.com。
如何禁用外部链接的域屏蔽?
I registered domain www.a.com
I then forwarded with masking (using GoDaddy) traffic from www.a.com to www.really.long.url.com, so users will only see www.a.com in their address bar when visiting my site.
The problem, is that if a user clicks a link to www.google.com while on my website, they get directed to Google, but their address bar still reads www.a.com.
How can I disable this domain masking for external links?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
最好的答案是“不要使用域名屏蔽”,因为它有很多缺点,包括:
a.com
,因为它没有 - 它仍然由really.long.url.com
提供服务为了避免这些缺点,您应该为
a.com
配置 DNS,以便它和www
CNAME 实际上指向您的网络服务器,并且可以从为您的网站提供服务>a.com
直接。话虽如此,为了解决您提出的问题,应将域屏蔽站点内指向外部站点的链接更改为使用已弃用的
target="_top"
属性。这打破了 GoDaddy(和其他人)用来实现不太聪明的“域屏蔽”的不可见框架集。http://www.a.com/
的来源基本上如下所示:Best answer would be "don't use domain masking" because it has many drawbacks including:
a.com
, because it doesn't - it's still being served byreally.long.url.com
To avoid these drawbacks, you should configure the DNS for
a.com
so it and thewww
CNAME are actually pointed at your webserver, and your website can be served froma.com
directly.Having said that, to solve the question you asked, links to external sites from within a domain masked site should be changed to use the deprecated
target="_top"
attribute. This breaks out of the invisible frameset that GoDaddy (and others) use to implement the not-very-clever "domain masking". The source ofhttp://www.a.com/
basically looks something like this:我将添加有关 @Day 提供的解决方案的额外数据:
target="_top"
将使用链接中指定的 url 加载整个当前浏览器窗口(有效删除框架集页面)。目标:
_blank = 链接将在新窗口中打开
_top = 链接将清除所有现有框架并将 URL 作为最上面的文档打开
[来源:http://www.webmasterworld.com/forum21/4397.htm]
I'll just add extra data regarding the solution @Day provided:
target="_top"
will load the entire current browser window with the url specified in the link (Effectively removing the frameset page).Target:
_blank = Link will open in new window
_top = Link will clear any existing frames and open URL as the uppermost document
[source: http://www.webmasterworld.com/forum21/4397.htm ]