目前网站的站内搜索功能,想按照 microdata 方式来写, schema.org 给出的参考例子为: https://schema.org/SearchAction , 如下代码:
<link itemprop="url" href="http://www.example.com/"/>
<form itemprop="potentialAction" itemscope itemtype="http://schema.org/SearchAction">
<meta itemprop="target" content="http://example.com/search?q={query}"/>
<input itemprop="query-input" type="text" name="query"/>
<input type="submit"/>
</form>
上面两种方法貌似都不太好,求 V2 们给出最合理的答案,谢谢
1
Felldeadbird 2017 年 2 月 16 日
你用 form GET 提交就会变成不友好的。所以用第一个方法吧。
|
2
1762628386 2017 年 2 月 16 日
表单 GET 方式提交的 URL 搜索引擎根本不感兴趣 也不会去抓取 也没法去抓取
|
3
Reign OP @1762628386 我会将用户搜索的 URL 存到 sitemap 里面去
|
4
nfroot 2017 年 2 月 16 日
扯了这么长还是没说清楚自己想要什么样的。
“求 V2 们给出最合理的答案” 你是要我们玩猜谜游戏吗,那起码给点提示好么 |
5
eirk2004 2017 年 2 月 16 日
http://example.com/search?q={query}
-> http://example.com/search/this-is-my-query-words.html 写一条 rewrite 规则,我没理解错吧 |
6
keller 2017 年 2 月 16 日
seo ? 弄个热门搜索呗
|
7
halden 2017 年 2 月 17 日
搜索引擎好像不会去抓你动态生成的 query words 吧?
|