[英]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.