2013-03-26 49 views
3

默认情况下,使用Durandal的路由器创建网址的格式为这样:如何使用#!而不是在Durandal URL中只有#号?

http://example.com/#/whiskey-tango-foxtrot

不过,我想使用#!搜索引擎优化的目的,从而使URL看起来像这样:

http://example.com/#!/whiskey-tango-foxtrot

欲了解更多信息上了我的意思,请参见:https://developers.google.com/webmasters/ajax-crawling/

任何想法我可以如何与迪朗达尔做到这一点?

+1

有对谷歌组后上类似的话题:https://groups.google.com/论坛/?fromgroups =#!topic/durandaljs/F0TqaqYPnPw – 2013-03-26 23:25:15

+1

我即将开始一个项目使用杜兰道必须克服相同的问题。在durandaljs.com上有一篇关于此主题的新文章: http://durandaljs.com/documentation/Making-Durandal-Apps-SEO-Crawlable/ – Davy 2014-01-13 10:49:07

+0

所有的Durandal doc网址都已更改,现在有.html '追加到最后。上面链接的新网址是http://durandaljs.com/documentation/Making-Durandal-Apps-SEO-Crawlable.html – 2014-02-06 05:32:00

回答

0

你可能有覆盖路由器插件的功能等“preparerouteInfo”,和其他人(cancelNavigation)

相关问题