In angular, you can set $locationProvider.html5Mode(true);
to get rid of the # in the URL so we get pretty URL and when share on facebook, the URL will actual pass into facebook instead of cut off after the hashtag. But html5Mode (https://github.com/angular-ui/ui-router/wiki/Frequently-Asked-Questions#issue-my-assets-and-templates-are-not-loading) require server set up to redirect or mod rewrite. How to do server end 310 redirect, mod rewrite in a stamplay server? How can I configure the hosting on Stamplay so that is suitable for SPAs? Can it just do it for me per request like GoDaddy or other Nginx or Apache hosts?
Asked
Active
Viewed 48 times
0

krob
- 3
- 1
1 Answers
1
To enable the url rewrite on the server side, all you need to do is navigate to the hosting section inside your Application Dashboard, go to the Hosting section and check the Single Page Apps mode (Rewrite URLs to entry point of your app).
checkbox.
Other steps still need to be taken to setup pretty urls, and differ among frameworks and libraries. For the best support on this issue, search for solution specific to the framework or library you are using for routing.

Giuliano Iacobelli
- 1,010
- 1
- 8
- 21