In AngularJS if you want to get rid of the ‘#’ in the url, you set html5Mode to true. But then this sends a request to the server for the page, no longer making it a single page application, is this correct? The way I can tell this is because when I comment out setting the html5Mode to true, the ‘#’ is in the url and my website works as a single page application. But when I set html5Mode to true, I can tell the request went to my server because instead of going to the correct page of my application, it goes to my home page meaning that the request went to my server and my .htaccess file took it as a 404 error and sent the user to the home page (since I have
RewriteEngine on and
ErrorDocument 404 /index.php working in my .htaccess file. Bottom line: the page request went to my server which its not supposed to do since it is a single page application. So is there any way to make a website single page application where the request does not go to the server, AND html5Mode is set to true? I currently have
<base href="/">. Does that have anything to do with it?