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
精彩评论