Is there a way to access complete angular URL (with #!) in JAVA filter?
We have many pages implemented using angular JS. We have created offline snapshot html and store it for web crawlers.
Now when a web crawler asks for a particular page, based on user agent value we redirect the request to a JAVA servlet which returns appropriate snapshot page to crawler.
When the request comes in to the servlet from a crawler (like Endeca), I just get the url till #.. and everything after # in the url is lost hence servlet is not able to return corresponding snapshot.
I know that its not possible to send complete url (along with #) via http request but I want to know if there is a way to overcome this issue.
curl -A "endeca webcrawler" "http://test.com/test#!/test1/id"
In JAVA servlet filter I get just http://test.com/test
Note: Google and bing bit convert #! to _escaped_fragment hence I don't see issues with those crawlers.
链接地址: http://www.djcxy.com/p/89614.html