Forcing html5 in angular is not an option since I need users to be able to use the website regardless of the browser they use. Any request with the same format should get redirected to its angular route.
Asked
Active
Viewed 73 times
1
-
could use a haproxy solution too – ConfusedLuigi Feb 23 '17 at 16:44
-
Possible duplicate of [How to redirect a url in NGINX](http://stackoverflow.com/questions/10294481/how-to-redirect-a-url-in-nginx) – georgeawg Feb 23 '17 at 18:33
-
1Just add a rule to nginx that when any request to `http://example.com/*` is made, nginx has to serve `http://example.com/index.html`. AngularJS will take care of the rest. – georgeawg Feb 23 '17 at 18:52
-
@georgeawg mind adding an example? can't find any similar ones – ConfusedLuigi Feb 23 '17 at 19:08
-
See [Module ngx_http_rewrite_module Documentation](http://nginx.org/en/docs/http/ngx_http_rewrite_module.html). – georgeawg Feb 23 '17 at 19:34