开发者

wicket sessions: how to prevent "jsessionid" from showing up in googlebot crawl results?

When google crawls our site the resulting URLs all have the jsessionid appended to them. Is this happening because the app server is detecting a lack of cookie support in Googlebot, forcing the session to be maintained via URL-rewriting? Is there anything I can do about it?

开发者_如何学CIs the solution simply to never call Component.getSession() ? Is there anything like HttpServletRequest.getSession(false) ?

Edit: just found org.apache.wicket.Session.exists()


Found the solution in SEO - Search Engine Optimization - Apache Wicket Wiki.

In a nutshell:

  • override WebApplication.newWebResponse()
  • have it return a BufferedWebResponse that checks to see if the user-agent is a crawler (i.e. googlebot) or not
  • if it's a crawler, don't re-write the URL
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜