3

By default, URLs created using Durandal's router is formatted as such:

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

However, I'd like to use #! for SEO purposes, so that the URL looks like this:

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

For more info on what I mean, see: https://developers.google.com/webmasters/ajax-crawling/

Any idea how I may accomplish this with Durandal?

Kevin Brown-Silva
  • 40,873
  • 40
  • 203
  • 237
Young
  • 442
  • 5
  • 14
  • 1
    There is a post on google groups on a similar topic: https://groups.google.com/forum/?fromgroups=#!topic/durandaljs/F0TqaqYPnPw – Evan Larsen Mar 26 '13 at 23:25
  • 1
    Im about to start a project using durandal that will have to tacle the same problem. There is a new article on durandaljs.com that covers this topic: http://durandaljs.com/documentation/Making-Durandal-Apps-SEO-Crawlable/ – Davy Jan 13 '14 at 10:49
  • All the Durandal doc urls have changed and now have '.html' appended to the end. The new url for the link above is http://durandaljs.com/documentation/Making-Durandal-Apps-SEO-Crawlable.html – Daniel Feb 06 '14 at 05:32

1 Answers1

0

You probably have to override the router plugin, like the function "preparerouteInfo", and others (cancelNavigation)

alpinescrambler
  • 1,934
  • 16
  • 26