title: Reloading the page gives wrong GET request with AngularJS HTML5 mode
body: <p>I want to enable HTML5 mode for my app. I have put the following code for the configuration, as shown <a href="http://docs.angularjs.org/guide/dev_guide.services.$location" rel="noreferrer">here</a>:</p>
  
  <pre><code>return app.config(['$routeProvider','$locationProvider', function($routeProvider,$locationProvider) {
  
      $locationProvider.html5Mode(true);
      $locationProvider.hashPrefix = '!';
  
      $routeProvider.when('/', {
          templateUrl: '/views/index.html',
          controller: 'indexCtrl'
      });
      $routeProvider.when('/about',{
          templateUrl: '/views/about.html',
          controller: 'AboutCtrl'
      });
  </code></pre>
  
  <p>As you can see, I used the <code>$locationProvider.html5mode</code> and I changed all my links at the <code>ng-href</code> to exclude the <code>/#/</code>.</p>
  
  <h2>The Problem</h2>
  
  <p>At the moment, I can go to <code>localhost:9000/</code> and see the index page and navigate to the other pages like <code>localhost:9000/about</code>. </p>
  
  <p>However, the problem occurs when I refresh the <code>localhost:9000/about</code> page. I get the following output: <code>Cannot GET /about</code></p>
  
  <p>If I look at the network calls:</p>
  
  <pre><code>Request URL:localhost:9000/about
  Request Method:GET
  </code></pre>
  
  <p>While if I first go to <code>localhost:9000/</code> and then click on a button that navigates to <code>/about</code> I get:</p>
  
  <pre><code>Request URL:http://localhost:9000/views/about.html
  </code></pre>
  
  <p>Which renders the page perfectly. </p>
  
  <p><strong>How can I enable angular to get the correct page when I refresh?</strong></p>