How to change hashbang url in history API

I am using ember1.0-rc3, I want to change the hashbang urls to the regular url format (e.g. www.site.com/admin#/page1 to www.site.com/admin/page1). In order to make this change I use the location: "history" in the application router.

But when I reload the page or bookmark, the page does not work, it is redirected only to the home page. I need the settings to reload and bookmark in my application without changing the redirect URLs in the .htaccess file. Is there any way for this? thanks in advance

+4
source share
1 answer

In order to use HTML5 history with a single-page application like ember, your server must have the rendering behavior of the main index.html file for any URL. The Ember router has logic to look at the URL when it loads and follows the correct route.

+4
source

Source: https://habr.com/ru/post/1487837/


All Articles