![](/img/trans.png)
[英]Is there a way to change a style/html on a specific tagged page on Tumblr blog?
[英]Redirecting a custom domain to a specific tumblr page, rather than the blog
希望我能对此有所帮助。 我正在研究将域重定向到特定的tumblr页面,而不是主博客,以充当静态登录页面。 在这种情况下,我设法找到了要重定向的JavaScript:
if(location.href == 'http://example.tumblr.com/') location.replace('http://example.tumblr.com/about');;
但这意味着我无法返回主博客,因为它会不断重定向回登录页面。 我可以同时拥有两个世界吗? 最好在我自己的网站上执行此操作。 至少到目前为止,在此处进行快速搜索并没有发现此特定问题。
因此,您要执行的操作是,当用户转到您的博客时,他被重定向到另一个页面,而当您使用博客上的链接转到该页面时,他未被重定向? 如果是这样,请在首页的链接中添加#
。 因为"http://example.tumblr.com/#"
不等于"http://example.tumblr.com/"
我想您想将用户重定向到某个页面(如果他/她来自另一个域)。 您可以使用它,这将检查引荐来源网页并相应地进行重定向。
if(!/http:\/\/(www\.)?YOUR_DOMAIN\.com/.test(document.referrer)) {
window.location = "http://example.tumblr.com/about";
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.