I have an angular application that uses ui-router for routing between different states. Mainly /#/ and /#/login. I am also using SSL, so I redirect http to https in my .htaccess-file. It works when I go to test.example.com/#/ but when I go directly to test.example.com/#/login the redirect does not work.
Note that we use a subdomain.
.htaccess look like this:(stolen from htaccess redirect to https://www)
RewriteCond %{HTTPS} off
# First rewrite to HTTPS:
# Don't put www. here. If it is already there it will be included, if not
# the subsequent rule will catch it.
RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
# Now, rewrite any request to the wrong domain to use www.
RewriteCond %{HTTP_HOST} !^www\.
RewriteRule .* https://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
Thanks.