如何阻止 onebox 重定向?

Hello,

Consider a situation for an affiliate marketer…

where path http://x.com/go/discourse/ is HTTP 301 to https://discourse.org/ref=1 again HTTP 301 to https://discourse.org/

Problem is when I type first link, in onebox it automatically redirect to the final destination which is causing loss of revenue.

Please help me in disabling onebox and redirection for the specific path http://x.com/go/*

I want when I type http://x.com/go/discourse/ link should be as it is without modification.

Thanks

You should be able to goto Admin -> Settings -> Onebox -> Onebox Domains Blacklist to get the result you want

Thanks for the response.

I am sorry to inform, It’s not working. :frowning:

1 个赞

You haven’t entered a domain in the domain blacklist.

Onebox Blacklist option is not working. Ref: video
https://www.useloom.com/share/f196f419ade04167b5e8a18b1c6f1126

Can you repro this @jomaxro?

1 个赞

I can sort-of repro this.

Entering meta.discourse.org into onebox domains blacklist correctly prevents oneboxes of meta.discourse.org links. However, entering gulshankumar.net and www.gulshankumar.net into the setting does not prevent the oneboxing of https://www.gulshankumar.net/go/sucuri-website-firewall.

Wait so the OP wants to prevent SELF oneboxing? That’s really weird.

1 个赞

www.gulshankumar.net isn’t an internal onebox. Discourse appears to be at help.gulshankumar.net - www.gulshankumar.net appears to be a WP site.

2 个赞

Still this might be an unreasonable edge case if it is the same domain. Why wouldn’t you want to onebox your own stuff?

I think the intent is to post referer links without them being obvious referer links but still have them be referer links.

For example, preserving the “u=mittineague” query string.
https://meta.discourse.org/t/how-can-i-stop-redirection/81515/12?u=mittineague

I’m not certain about what kind of RewriteRule voodoo is going on or what domains are involved.

To me, the obvious solution would be to display the link as a link and not onebox it. eg.
https://meta.discourse.org/t/how-can-i-stop-redirection/81515/12?u=mittineague

1 个赞

Hello,

I appreciate your curiosity, why I wouldn’t like Onebox. The major issue is redirection which happens due to Onebox.

Basically, to keep affiliate URLs short, memorable and easily managed at one place, I use redirection. I use Affiliate Link Lite plugin to convert ugly affiliate link to the branded form.

https://www.gulshankumar.net/go/any-product-name/

What I am expecting, If I type my affiliate URL, Onebox shoudn’t display final destination instead of clocked path (which is /go/).

Exactly. Thanks for understanding.

2 个赞

@codinghorror 我在我的论坛上遇到了同样的基本问题,想知道是否已经有办法强制让 onebox 黑名单在兄弟域名上生效?

在我的情况下,我有 forum.x.orgarchive.x.org。后者使用论坛作为 SSO 提供商以允许访问。当输入来自 archive 的 URL 时,它会被 onebox 处理,并且该 URL 会被重定向到类似 forum.x.org/session/sso_provider?sso=..... 的链接。如果点击该链接,会导致错误页面。

@codinghorror 啊,我今早刚检查了一个情况,似乎只有在我把归档域名加入 onebox 黑名单之前,那些已经被 oneboxed(且包含错误的重定向链接)的链接才会出现这个问题。所以一定存在一个 onebox 缓存?你知道如何从该缓存中移除链接吗?

如果您想强制打破缓存,可以添加一个查询字符串,例如:

example.com/link?x

2 个赞

谢谢,知道了。看来它自己及时从缓存中清除了,现在已经解决,但在未来遇到问题时会有用。

2 个赞