You can verify by yourself tha's not really a duplicated question !
The problem is clear: I want to remove the # angular urls without HTTP error 404.
www.mondomaine.fr/#/pageX -> www.mondomaine.fr/pageX
/#/PageX -> /pageX
To do this, simply I uses the html5mde (this way):
$LocationProvider.html5Mode (true);
And it works very well :) if I navigate by clicking on the links/buttons/etc in my singlePage :( The problems start when:
- I type www.mondomaine.fr/pageX => page not found HTTP 404
- I refresh the page => page not found HTTP 404
I found the explanation but not the solution, good as beginning :-°. When I click on the button pageX on my page, it shows me the good HTML fragment pageX because it is Angular that treats click (~ request), but when I refresh my navigator or I type the URL myselfin the ben browser the request is sent to the server and my back-end, which is a RESTful API, now is not supposed to know process the request HTTP/GET www.mondomaine.fr/pageX. I hope you understand me, there is no hashtag then slap it on the server.
PS: - My back end is a restful API made with JavaEE / spring-boot. - "" is addes in index.html in the beginning of
How to solve this problem? Thank you for your feedback. Thanks