angularjs - 在 html5 模式下使用 AngularJS 进行 seo

标签 angularjs seo

我正在尝试让启用了 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

YearofMoo - SEO

关于angularjs - 在 html5 模式下使用 AngularJS 进行 seo,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22017311/

相关文章:

javascript - 自定义过滤器仅搜索特定字段的多个关键字

angularjs - 为什么在配置中没有触发解析?

joomla - 如何从 joomla 1.6 中的文章 ID 获取菜单项的 url?

javascript - 包含带有phonegap的指令

javascript - AngularJS:防止验证隐藏的表单字段

javascript - AngularJS - 单击按钮时将样式/类添加到父元素

SEO H2 标签放在 H1 之上,有关系吗?

.net - UMBRACO SEO 问题 : Multiple Canonical Formats

javascript - 尽管 robots.txt 配置正确,网站仍出现在 Google SERP 上

seo - 多层站点地图?