jquerypushstatejquery-address

jQuery Address appends new deep link to existing deep link


It's i think about the same issue as here but no solution there was given. If you directly enter a jQuery Address loaded website through a deep link http://www.domain.com/deeplink1and you would want to go to a next page by pressing a link, the next deep link is appended to the initial deep link http://www.domain.com/deeplink1/deeplink2.

How do I prevend this?


Solution

  • Solution was actually simple. This post brought me up the idea (which is a bit ironic actually since it's a post about jquery address competitor hehehe). I had at initialization the following set up

    $.address.state($.address.baseURL()).init(function(event)

    this caused the entry url to be the root domain. I now changed this to

    $.address.state('/').init(function(event)

    which causes the root (hostname) to be the entry domain. This solved the problem.