我正在尝试让启用了 html5 模式的 AngularJS 被谷歌索引。
在我的 app.js 中有以下代码片段:
$locationProvider.html5Mode(true);
在我的 index.html head
中,我有以下内容:
<base href="/"/>
<meta name="fragment" content="!"/>
我希望收到格式为 /?_escaped_fragment_=support
的 url 请求。相反,我在 /support?_escaped_fragment_=
上收到请求。
是我的配置有问题还是我预料到了一些奇怪的事情?
最佳答案
根据 yearofmoo SEO 文章你应该得到这个:
http://yourwebsite.com/?_escaped_fragment_=/some/page/with/ajax/content
关于angularjs - 在 html5 模式下使用 AngularJS 进行 seo,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22017311/