Good day. In general, I will describe the situation, so that it is more or less clear what's what. I have a project on angularjs , I need to be indexed in Google .
Google itself says that if you insert the meta tag <meta name="fragment" content="!"> header website header , the search engine understands that the site has ajax content and it has links like http://sitename/#!/blog/news reads like http://sitename?_escaped_fragment_=blog/news .
I did the following:
in
angularjs:Application.config(['$locationProvider',function($locationProvider){ $locationProvider.hashPrefix('!'); $locationProvider.html5Mode(true); }]);I wrote a mini engine that delivers content to
Googlevia the link:http://sitename/api/html?page=blog/news.In
.htaccessredirect all requests where there is agetparameter_escaped_fragment_to api statics:RewriteCond %{REQUEST_URI} ^/$ RewriteCond %{QUERY_STRING} ^_escaped_fragment_=/?(.*)$ RewriteRule ^(.*)$ /api/html?page=%1 [NC,R=301,L]Link test
http://sitename?_escaped_fragment_=blog/news- everything is fine, redirects tohttp://sitename/api/html?page=blog/newsand shows the desired content.
And as if everything is good and everything should work correctly, but I check the links of the site in google.com/webmasters/tools - and there the html angularjs project (the one in which I inserted the meta tag <meta name="fragment" content="!"> ), and I understand that Google doesn’t even pay attention to <meta name="fragment" content="!"> .
Question: what am I doing wrong, how can I fix this? Can someone come across this, can someone give advice?