Angular HTML5 mode, router going to otherwise state on page reload
<p>I am trying to remove hash tag from my website. I have achieved it by following code.</p>

<pre><code>$locationProvider.html5Mode(true);
</code></pre>

<p>As well as added base URL in index file as well.</p>

<p>My issue is if i am on contct-us state after reloading entire page. i am redirecting to home state which is defined as otherwise state.</p>

<p>Configuration used are - </p>

<p>server -Appache
  database - mysql</p>

<p>I have added following code in .htaccess for rewriting rule as well -</p>

<pre><code>     RewriteEngine On
     php_value post_max_size 120M 
    php_value upload_max_filesize 120M 
     php_value max_execution_time 90 



     RewriteCond %{HTTP_HOST} ^54\.201\.153\.244$ [NC,OR]

     RewriteCond %{HTTPS} off
     RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R,L]

      RewriteCond %{HTTP_HOST} ^adkarlo.com$ [NC]
        RewriteRule ^(.*)$ https://www.adkarlo.com/$1 [R=301,L]

      #RewriteBase /html/
      ErrorDocument 404 /404.php

    RewriteCond %{REQUEST_FILENAME} -f
     RewriteRule ^ - [L]
   RewriteRule ^(.*)$ index.php [L]
</code></pre>

<p>Expected result - After reloading from state contact-us any page i want to go to same page.</p>