I already have done $locationProvider.html5Mode(true);
but it is not working. Whenever I access http://example.com
it goes to http://example.
Add to your html file
and this one is for your app.js $locationProvider.html5Mode(true);
this is for .htaccess
create file if you don't have.
RewriteEngine On
# If an existing asset or directory is requested go to it as it is
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} -f [OR]
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} -d
RewriteRule ^ - [L]
RewriteRule ^ /foldername/