title: Url refresh and reload not working after removing # sign from url angularjs
body: <blockquote>
    <p>My app.js</p>
  </blockquote>
  
  <pre><code>app.config(['$routeProvider','$locationProvider', function($routeProvider,$locationProvider) {
      $routeProvider.
      when('/', {
          templateUrl: 'interests.html',
          controller: 'InterestsController'
      })
      .when('/interests',{
          templateUrl: 'interests.html',
          controller: 'InterestsController'
      })
      .when('/subjects',{
          templateUrl: 'subjects.html',
          controller: 'SubjectsController'
      })
      .when('/prequalification',{
          templateUrl: 'prequalification.html',
          controller: 'PreQualificationController'
      })
      .when('/qualification',{
          templateUrl: 'qualification.html',
          controller: 'QualificationController'
      })
      .when('/personalinfo',{
          templateUrl: 'personalinfo.html',
          controller: 'PersonalInfoController'
      })
      .otherwise({
          redirectTo : '/interests'
      });
      if(window.history &amp;&amp; window.history.pushState){
          $locationProvider.html5Mode(true);
      }
  }]);
  </code></pre>
  
  <blockquote>
    <p>In index.html file. Path to index.html file: localhost:8080/cf/. All of the other views also resides with index.html</p>
  </blockquote>
  
  <pre><code>&lt;base href="/cf/"&gt;
  </code></pre>
  
  <blockquote>
    <p>.htaccess file content(path to .htaccess file: localhost:8080/cf/.htaccess)</p>
  </blockquote>
  
  <pre><code>&lt;ifModule mod_rewrite.c&gt;
      RewriteEngine on
  
      # Don't rewrite files or directories
      RewriteCond %{REQUEST_FILENAME} -f [OR]
      RewriteCond %{REQUEST_FILENAME} -d
      RewriteRule ^ - [L]
  
  
      RewriteRule ^ cf/index.html [L]
  &lt;/ifModule&gt;
  </code></pre>
  
  <blockquote>
    <p>Path to my project folder on server is: localhost:8080/cf. I have various rules in .htaccess file from other posts of stackoverflow but nothing is working. When even i reload or refresh the page, i get 404. With out refreshing and reloading everything is working fine. Please help!!!</p>
  </blockquote>