Hacker News new | ask | show | jobs
by huhtenberg 5388 days ago
This should really be handled on a server side with a set of redirects, and Twitter would be a good example to follow. Their redirect setup is this:

  http://.../_escaped_fragment_=PAGE  ->  http://.../PAGE
The _escaped_fragment_ URL is what is crawled by Google as per [0] and the redirect ensures that PAGE gets recorded in Google as /PAGE. Then they also do this:

  http://.../PAGE   ->   http://.../#!/PAGE
but only for logged in users and, I would assume, NOT for requests that have _escaped_fragment_ in the Referer (sic). This ensures that regular URLs work as expected, including those picked up by the users from Google.

[0] http://code.google.com/web/ajaxcrawling/docs/specification.h...